Package jade.domain.introspection

Examples of jade.domain.introspection.DeadAgent


  public void deadAgent(PlatformEvent ev) {
    ContainerID cid = ev.getContainer();
    AID agentID = ev.getAgent();

    DeadAgent da = new DeadAgent();
    da.setAgent(agentID);
    da.setWhere(cid);
    if (ev.getContainerRemoved()) {
      da.setContainerRemoved(new Boolean(true));
    }

    EventRecord er = new EventRecord(da, localContainer);
    er.setWhen(ev.getTime());
    eventQueue.put(er);
View Full Code Here


      // about dead agents.
      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

  private void amsSubscribe(final AID owner) {
    myAMSSubscriber = new AMSSubscriber() {
      protected void installHandlers(Map handlersTable) {
        handlersTable.put(IntrospectionVocabulary.DEADAGENT, new EventHandler() {
          public void handle(Event ev) {
            DeadAgent da = (DeadAgent) ev;
            if (da.getAgent().equals(owner)) {
              // My Owner is dead --> suicide
              doDelete();
            }
          }
        });
View Full Code Here

TOP

Related Classes of jade.domain.introspection.DeadAgent

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.