Package jade.core

Examples of jade.core.ContainerID


      }
    }
   
    private void handleKillContainer(VerticalCommand cmd) throws IMTPException, ServiceException, NotFoundException {
      Object[] params = cmd.getParams();
      ContainerID cid = (ContainerID)params[0];
     
      if(myLogger.isLoggable(Logger.CONFIG)) {
        myLogger.log(Logger.CONFIG,"Source Sink consuming command KILL_CONTAINER. Container is "+cid.getName());
      }
     
      // Forward to the correct slice
      AgentManagementSlice targetSlice = (AgentManagementSlice)getSlice(cid.getName());
      try {
        try {
          targetSlice.exitContainer();
        }
        catch(IMTPException imtpe) {
          // Try to get a newer slice and repeat...
          targetSlice = (AgentManagementSlice)getFreshSlice(cid.getName());
          targetSlice.exitContainer();
        }
      }
      catch (NullPointerException npe) {
        // targetSlice not found --> The container does not exist
        throw new NotFoundException("Container "+cid.getName()+" not found");
      }
    }
View Full Code Here


   
    private void handleInformCreated(VerticalCommand cmd) throws NotFoundException, NameClashException, ServiceException {
      Object[] params = cmd.getParams();
     
      AID agentID = (AID)params[0];
      ContainerID cid = (ContainerID)params[1];
     
      if(myLogger.isLoggable(Logger.FINE)) {
        myLogger.log(Logger.FINE,"Target sink consuming command INFORM_CREATED: Name is "+agentID.getName());
      }
     
View Full Code Here

          impl.bornAgent(name, cid, principal, ownership, false);
        }
        catch(NameClashException nce) {
          //#CUSTOMJ2SE_EXCLUDE_BEGIN
          try {
            ContainerID oldCid = impl.getContainerID(name);
            if (oldCid != null) {
              Node n = impl.getContainerNode(oldCid).getNode();
             
              // Perform a non-blocking ping to check...
              n.ping(false);
View Full Code Here

          result = gCmd;
        }
        else if(cmdName.equals(AgentManagementSlice.H_BORNAGENT)) {
          GenericCommand gCmd = new GenericCommand(AgentManagementSlice.INFORM_CREATED, AgentManagementSlice.NAME, null);
          AID agentID = (AID)params[0];
          ContainerID cid = (ContainerID)params[1];
          gCmd.addParam(agentID);
          gCmd.addParam(cid);
         
          result = gCmd;
        }
View Full Code Here

        previous = (BackEndContainer.AgentImage) myContainer.addAgentImage(agentID, image);
      }

      // Notify the Main Container. Roll back if something fails
      try {
        ContainerID cid = myContainer.getID();
        AgentManagementSlice mainSlice = (AgentManagementSlice)getSlice(MAIN_SLICE);
        try {
          mainSlice.bornAgent(agentID, cid, cmd);
        }
        catch(IMTPException imtpe) {
View Full Code Here

          result = gCmd;
        }
        else if(cmdName.equals(AgentManagementSlice.H_BORNAGENT)) {
          GenericCommand gCmd = new GenericCommand(AgentManagementSlice.INFORM_CREATED, AgentManagementSlice.NAME, null);
          AID agentID = (AID)params[0];
          ContainerID cid = (ContainerID)params[1];
          String ownership = (String) params[2];
          gCmd.addParam(agentID);
          gCmd.addParam(cid);
          gCmd.addParam(ownership);
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.