Examples of DeadAgent


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

Examples of jade.domain.introspection.DeadAgent

      // 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

Examples of jade.domain.introspection.DeadAgent

  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
Copyright © 2018 www.massapi.com. 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.