Package jade.core

Examples of jade.core.AID


   myRMA = anRMA;
    }
    public void doAction(AgentTree.AgentNode node ) {
  String agentName  = node.getName();
  AID agentAid = new AID();
  agentAid.setName(agentName);
  myRMA.saveAgent(agentAid, "JADE-DB");
    }
View Full Code Here


   myRMA = anRMA;
    }
    public void doAction(AgentTree.AgentNode node ) {
  String agentName  = node.getName();
  AID agentAid = new AID();
  agentAid.setName(agentName);
  myRMA.freezeAgent(agentAid, "JADE-DB");
    }
View Full Code Here

      amsSubscriber = new AMSSubscriber() {
        protected void installHandlers(java.util.Map handlersTable) {
          handlersTable.put(IntrospectionVocabulary.DEADAGENT, new EventHandler() {
            public void handle(Event ev) {
              DeadAgent da = (DeadAgent)ev;
              AID id = da.getAgent();
              // Deregister the dead agent in case it was registered
              try {
                DFAgentDescription dfd = new DFAgentDescription();
                dfd.setName(id);
                DFDeregister(dfd);
View Full Code Here

    }
    DFAgentDescription dfd = new DFAgentDescription();
    dfd.setName(getAID());
    Iterator it = parents.iterator();
    while(it.hasNext()) {
      AID parentName = (AID)it.next();
      try {
        DFService.deregister(this, parentName, dfd);
      }
      catch(FIPAException fe) {
        fe.printStackTrace();
View Full Code Here

  /**
   Serve the GetDescriptionUsed action of the DF-Applet ontology
   Package scoped since it is called by DFAppletManagementBehaviour.
   */
  List getDescriptionUsedAction(GetDescriptionUsed action, AID requester) {
    AID parent = action.getParentDF();
    if(logger.isLoggable(Logger.CONFIG))
      logger.log(Logger.CONFIG,"Agent "+requester+" requesting action GetDescriptionUsed to federate with "+parent.getName());
    // FIXME: This embeds the description into a list since the Applet still expects a List
    List tmp = new ArrayList();
    tmp.add(getDescriptionOfThisDF(parent));
    return tmp;
  }
View Full Code Here

  /**
   Serve the Federate action of the DF-Applet ontology
   Package scoped since it is called by DFAppletManagementBehaviour.
   */
  void federateAction(final Federate action, AID requester) {
    AID remoteDF = action.getDf();
    if(logger.isLoggable(Logger.CONFIG))
      logger.log(Logger.CONFIG,"Agent "+requester+" requesting action Federate with DF "+remoteDF.getName());
    Register r = new Register();
    DFAgentDescription tmp = action.getDescription();
    final DFAgentDescription dfd = (tmp != null ? tmp : getDescriptionOfThisDF());
    r.setDescription(dfd);
    Behaviour b = new RemoteDFRequester(remoteDF, r) {
View Full Code Here

  /**
   Serve the RegisterWith action of the DF-Applet ontology
   Package scoped since it is called by DFAppletManagementBehaviour.
   */
  void registerWithAction(final RegisterWith action, AID requester){
    AID remoteDF = action.getDf();
    if(logger.isLoggable(Logger.CONFIG))
      logger.log(Logger.CONFIG,"Agent "+requester+" requesting action RegisterWith on DF "+remoteDF.getName());
    Register r = new Register();
    final DFAgentDescription dfd = action.getDescription();
    r.setDescription(dfd);
    Behaviour b = new RemoteDFRequester(remoteDF, r) {
      public int onEnd() {
View Full Code Here

  /**
   Serve the DeregisterFrom action of the DF-Applet ontology
   Package scoped since it is called by DFAppletManagementBehaviour.
   */
  void deregisterFromAction(final DeregisterFrom action, AID requester){
    AID remoteDF = action.getDf();
    if(logger.isLoggable(Logger.CONFIG))
      logger.log(Logger.CONFIG,"Agent "+requester+" requesting action DeregisterFrom on DF "+remoteDF.getName());
    Deregister d = new Deregister();
    final DFAgentDescription dfd = action.getDescription();
    d.setDescription(dfd);
    Behaviour b = new RemoteDFRequester(remoteDF, d) {
      public int onEnd() {
View Full Code Here

  /**
   Serve the ModifyOn action of the DF-Applet ontology
   Package scoped since it is called by DFAppletManagementBehaviour.
   */
  void modifyOnAction(final ModifyOn action, AID requester){
    AID remoteDF = action.getDf();
    if(logger.isLoggable(Logger.CONFIG))
      logger.log(Logger.CONFIG,"Agent "+requester+" requesting action ModifyOn on DF "+remoteDF.getName());
    Modify m = new Modify();
    m.setDescription(action.getDescription());
    Behaviour b = new RemoteDFRequester(remoteDF, m) {
      public int onEnd() {
        sendPendingNotification(action, getResult());
View Full Code Here

  /**
   Serve the SearchOn action of the DF-Applet ontology
   Package scoped since it is called by DFAppletManagementBehaviour.
   */
  void searchOnAction(final SearchOn action, AID requester){
    AID remoteDF = action.getDf();
    if(logger.isLoggable(Logger.CONFIG))
      logger.log(Logger.CONFIG,"Agent "+requester+" requesting action SearchOn on DF "+remoteDF.getName());
    Search s = new Search();
    s.setDescription(action.getDescription());
    s.setConstraints(action.getConstraints());
    Behaviour b = new RemoteDFRequester(remoteDF, s) {
      public int onEnd() {
View Full Code Here

TOP

Related Classes of jade.core.AID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.