Package jade.core

Examples of jade.core.ContainerID


    CreateAgent ca = new CreateAgent();
    String localName = myAgent.getLocalName()+"-helper-on-"+containerName;
    ca.setAgentName(localName);
    ca.setClassName("jade.tools.logging.LogHelperAgent");
    ca.addArguments(myAgent.getAID());
    ca.setContainer(new ContainerID(containerName, null));
   
    Action act = new Action();
    act.setActor(myAgent.getAMS());
    act.setAction(ca);
   
View Full Code Here


      if(impl != null) {   
        // Activate sniffing each element of the list
        Iterator it = targets.iterator();
        while(it.hasNext()) {
          AID target = (AID)it.next();
          ContainerID cid = impl.getContainerID(target);
         
          NotificationSlice slice = (NotificationSlice)getSlice(cid.getName());
          try {
            slice.sniffOn(sniffer, target);
          }
          catch(IMTPException imtpe) {
            // Try to get a newer slice and repeat...
            slice = (NotificationSlice)getFreshSlice(cid.getName());
            slice.sniffOn(sniffer, target);
          }
        }
      }
      else {
View Full Code Here

      if(impl != null) {
        // Deactivate sniffing each element of the list
        Iterator it = targets.iterator();
        while(it.hasNext()) {
          AID target = (AID)it.next();
          ContainerID cid = impl.getContainerID(target);
         
          NotificationSlice slice = (NotificationSlice)getSlice(cid.getName());
          try {
            slice.sniffOff(sniffer, target);
          }
          catch(IMTPException imtpe) {
            // Try to get a newer slice and repeat...
            slice = (NotificationSlice)getFreshSlice(cid.getName());
            slice.sniffOff(sniffer, target);
          }
        }
      }
      else {
View Full Code Here

      if(impl != null) {
        // Activate debugging each element of the list
        Iterator it = targets.iterator();
        while(it.hasNext()) {
          AID target = (AID)it.next();
          ContainerID cid = impl.getContainerID(target);
         
          NotificationSlice slice = (NotificationSlice)getSlice(cid.getName());
          try {
            slice.debugOn(introspector, target);
          }
          catch(IMTPException imtpe) {
            // Try to get a newer slice and repeat...
            slice = (NotificationSlice)getFreshSlice(cid.getName());
            slice.debugOn(introspector, target);
          }
        }
      }
      else {
View Full Code Here

      if(impl != null) {
        // Deactivate debugging each element of the list
        Iterator it = targets.iterator();
        while(it.hasNext()) {
          AID target = (AID)it.next();
          ContainerID cid = impl.getContainerID(target);
         
          NotificationSlice slice = (NotificationSlice)getSlice(cid.getName());
          try {
            slice.debugOff(introspector, target);
          }
          catch(IMTPException imtpe) {
            // Try to get a newer slice and repeat...
            slice = (NotificationSlice)getFreshSlice(cid.getName());
            slice.debugOff(introspector, target);
          }
        }
      }
      else {
View Full Code Here

    }
   
    private MTPDescriptor handleInstallMTP(VerticalCommand cmd) throws IMTPException, ServiceException, NotFoundException, MTPException {
      Object[] params = cmd.getParams();
      String address = (String)params[0];
      ContainerID cid = (ContainerID)params[1];
      String className = (String)params[2];
     
      MessagingSlice targetSlice = (MessagingSlice)getSlice(cid.getName());
      try {
        return targetSlice.installMTP(address, className);
      }
      catch(IMTPException imtpe) {
        targetSlice = (MessagingSlice)getFreshSlice(cid.getName());
        return targetSlice.installMTP(address, className);
      }
    }
View Full Code Here

    }
   
    private void handleUninstallMTP(VerticalCommand cmd) throws IMTPException, ServiceException, NotFoundException, MTPException {
      Object[] params = cmd.getParams();
      String address = (String)params[0];
      ContainerID cid = (ContainerID)params[1];
     
      MessagingSlice targetSlice = (MessagingSlice)getSlice(cid.getName());
      try {
        targetSlice.uninstallMTP(address);
      }
      catch(IMTPException imtpe) {
        targetSlice = (MessagingSlice)getFreshSlice(cid.getName());
        targetSlice.uninstallMTP(address);
      }
    }
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];
     
      MessagingSlice mainSlice = (MessagingSlice)getSlice(MAIN_SLICE);
      try {
        mainSlice.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];
     
      MessagingSlice mainSlice = (MessagingSlice)getSlice(MAIN_SLICE);
      try {
        mainSlice.deadMTP(mtp, cid);
      }
View Full Code Here

            throws IMTPException, NotFoundException, ServiceException, JADESecurityException {
            boolean ok = false;

            do {
                MessagingSlice mainSlice = (MessagingSlice) getSlice(MAIN_SLICE);
                ContainerID cid;

                try {
                    cid = mainSlice.getAgentLocation(receiverID);
                } catch (IMTPException imtpe) {
                    // Try to get a newer slice and repeat...
                    mainSlice = (MessagingSlice) getFreshSlice(MAIN_SLICE);
                    cid = mainSlice.getAgentLocation(receiverID);
                }

                MessagingSlice targetSlice = (MessagingSlice) getSlice(cid.getName());

                try {
                    targetSlice.dispatchLocally(msg.getSender(), msg, receiverID);
                    ok = true;
                } catch (NotFoundException nfe) {
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.