Package jade.core.management

Examples of jade.core.management.AgentManagementService


        Agent agent = myContainer.acquireLocalAgent(agentID);
        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)) {
View Full Code Here


     
      //#J2ME_EXCLUDE_BEGIN
      if (classStream == null && agentName != null) {
        // Maybe the class belongs to a separate Jar file --> Try with the CodeLocator
        try {
          AgentManagementService amSrv = (AgentManagementService) myFinder.findService(AgentManagementService.NAME);
          ClassLoader cLoader = amSrv.getCodeLocator().getAgentClassLoader(new AID(agentName, AID.ISGUID));
          classStream = cLoader.getResourceAsStream(fileName);
        }
        catch (NullPointerException npe) {
          // No jarfile or class not found in jarfile. Ignore
        }
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.");
        }
View Full Code Here

      if(myLogger.isLoggable(Logger.FINE)) {
        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.AgentManagementService

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.