Package jade.core.management

Examples of jade.core.management.CodeLocator


        String codeContainerName = getClassSite(agent);
        myContainer.releaseLocalAgent(agentID);

        //Check if the code is in the same container or in a remote one.
        AgentManagementService amSrv = (AgentManagementService) myFinder.findService(AgentManagementService.NAME);
        CodeLocator codeLocator = amSrv.getCodeLocator();
       
        if (codeContainerName == null) codeContainerName = containerName;
        if (containerName.equals(codeContainerName)) {
          if (codeLocator.isRegistered(agentID)) {
            if(myLogger.isLoggable(Logger.FINE)) {
              myLogger.log(Logger.FINE," adding clone " + newName  + " to code locator.");
            }
           
            codeLocator.cloneAgent(agentID, new AID(newName,AID.ISLOCALNAME));
         
        } else {
          //Send a CLONE_CODE_LOCATOR_ENTRY command to the container with the agent code.
          AgentMobilitySlice codeSlice = (AgentMobilitySlice) getSlice(codeContainerName);
          try {
View Full Code Here


   
    //#J2ME_EXCLUDE_BEGIN   
    private void handleCloneCodeLocatorEntry(AID oldAgentID, AID newAgentID) throws ServiceException, IMTPException, NotFoundException {
     
      AgentManagementService amSrv = (AgentManagementService) myFinder.findService(AgentManagementService.NAME);
      CodeLocator codeLocator = amSrv.getCodeLocator();
     
      if (codeLocator.isRegistered(oldAgentID)) {
        if(myLogger.isLoggable(Logger.FINE)) {
          myLogger.log(Logger.FINE," adding clone " + newAgentID.getName()  + " to code locator.");
        }
       
        codeLocator.cloneAgent(oldAgentID, newAgentID);
      }

    }
View Full Code Here

        myLogger.log(Logger.FINE,"Target sink consuming command REMOVE_CODE_LOCATOR_ENTRY");
      }

      // Remove entry from CodeLocator.
      AgentManagementService amSrv = (AgentManagementService) myFinder.findService(AgentManagementService.NAME);
      CodeLocator codeLocator = amSrv.getCodeLocator();
      codeLocator.removeAgent(agentID);
    }
View Full Code Here

TOP

Related Classes of jade.core.management.CodeLocator

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.