Package jade.core

Examples of jade.core.ContainerID


    er.setWhen(ev.getTime());
    eventQueue.put(er);
  }

  public void removedContainer(PlatformEvent ev) {
    ContainerID cid = ev.getContainer();
    String name = cid.getName();

    RemovedContainer rc = new RemovedContainer();
    rc.setContainer(cid);

    EventRecord er = new EventRecord(rc, localContainer);
View Full Code Here


    // corresponding to this event
  }

  public synchronized void addedMTP(MTPEvent ev) {
    Channel ch = ev.getChannel();
    ContainerID cid = ev.getPlace();
    String proto = ch.getProtocol();
    String address = ch.getAddress();

    // Generate a suitable AMS event
    AddedMTP amtp = new AddedMTP();
View Full Code Here

    }
  }

  public synchronized void removedMTP(MTPEvent ev) {
    Channel ch = ev.getChannel();
    ContainerID cid = ev.getPlace();
    String proto = ch.getProtocol();
    String address = ch.getAddress();

    RemovedMTP rmtp = new RemovedMTP();
    rmtp.setAddress(address);
View Full Code Here

    }
   
    private void handleInformCloned(VerticalCommand cmd) throws JADESecurityException, NotFoundException, NameClashException {
      Object[] params = cmd.getParams();
      AID agentID = (AID)params[0];
      ContainerID cid = (ContainerID)params[1];
      Credentials creds = (Credentials)params[2];
     
      clonedAgent(agentID, cid, creds);
    }
View Full Code Here

          handleTransferResult(agentID, transferResult, messages);
        }
        else if(cmdName.equals(AgentMobilitySlice.H_CLONEDAGENT)) {
          GenericCommand gCmd = new GenericCommand(AgentMobilityHelper.INFORM_CLONED, AgentMobilitySlice.NAME, null);
          AID agentID = (AID)params[0];
          ContainerID cid = (ContainerID)params[1];
          Credentials creds = (Credentials)params[2];
          gCmd.addParam(agentID);
          gCmd.addParam(cid);
          gCmd.addParam(creds);
         
View Full Code Here

    }
   
    private void handleNewMTP(VerticalCommand cmd) throws IMTPException, ServiceException {
      Object[] params = cmd.getParams();
      MTPDescriptor mtp = (MTPDescriptor)params[0];
      ContainerID cid = (ContainerID)params[1];
     
      newMTP(mtp, cid);
    }
View Full Code Here

    }
   
    private void handleDeadMTP(VerticalCommand cmd) throws IMTPException, ServiceException {
      Object[] params = cmd.getParams();
      MTPDescriptor mtp = (MTPDescriptor)params[0];
      ContainerID cid = (ContainerID)params[1];
     
      deadMTP(mtp, cid);
    }
View Full Code Here

          MessagingSlice newSlice = (MessagingSlice) getFreshSlice(newSliceName);
         
          // Send all possible routes to the new slice
          ContainerID[] cids = impl.containerIDs();
          for(int i = 0; i < cids.length; i++) {
            ContainerID cid = cids[i];
           
            try {
              List mtps = impl.containerMTPs(cid);
              Iterator it = mtps.iterator();
              while(it.hasNext()) {
                MTPDescriptor mtp = (MTPDescriptor)it.next();
                newSlice.addRoute(mtp, cid.getName());
              }
            }
            catch(NotFoundException nfe) {
              // Should never happen
              nfe.printStackTrace();
View Full Code Here

         
          result = gCmd;
        }
        else if(cmdName.equals(MessagingSlice.H_NEWMTP)) {
          MTPDescriptor mtp = (MTPDescriptor)params[0];
          ContainerID cid = (ContainerID)params[1];
         
          GenericCommand gCmd = new GenericCommand(MessagingSlice.NEW_MTP, MessagingSlice.NAME, null);
          gCmd.addParam(mtp);
          gCmd.addParam(cid);
         
          result = gCmd;
        }
        else if(cmdName.equals(MessagingSlice.H_DEADMTP)) {
          MTPDescriptor mtp = (MTPDescriptor)params[0];
          ContainerID cid = (ContainerID)params[1];
         
          GenericCommand gCmd = new GenericCommand(MessagingSlice.DEAD_MTP, MessagingSlice.NAME, null);
          gCmd.addParam(mtp);
          gCmd.addParam(cid);
         
View Full Code Here

  void notifyLocalMTPs() {
    Iterator it = routes.getLocalMTPs();
    while (it.hasNext()) {
      RoutingTable.MTPInfo info = (RoutingTable.MTPInfo) it.next();
      MTPDescriptor mtp = info.getDescriptor();
      ContainerID cid = myContainer.getID();
     
      try {
        MessagingSlice mainSlice = (MessagingSlice)getSlice(MAIN_SLICE);
        try {
          mainSlice.newMTP(mtp, cid);
View Full Code Here

TOP

Related Classes of jade.core.ContainerID

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.