Package jade.core

Examples of jade.core.GenericCommand.addParam()


        AID agentID = (AID) params[0];
        ContainerID cid = (ContainerID) params[1];

        GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_BORNAGENT, MainReplicationSlice.NAME, null);
        hCmd.addParam(agentID);
        hCmd.addParam(cid);
        hCmd.setPrincipal(cmd.getPrincipal());
        hCmd.setCredentials(cmd.getCredentials());

        broadcastToReplicas(hCmd, EXCLUDE_MYSELF);
View Full Code Here


        AID agentID = (AID) params[0];
        ContainerID cid = (ContainerID) params[1];

        GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_BORNAGENT, MainReplicationSlice.NAME, null);
        hCmd.addParam(agentID);
        hCmd.addParam(cid);
        hCmd.setPrincipal(cmd.getPrincipal());
        hCmd.setCredentials(cmd.getCredentials());

        broadcastToReplicas(hCmd, EXCLUDE_MYSELF);
      }
View Full Code Here

    private void handleInformKilled(VerticalCommand cmd) throws IMTPException, NotFoundException, ServiceException {
      Object[] params = cmd.getParams();
      AID agentID = (AID) params[0];

      GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_DEADAGENT, MainReplicationSlice.NAME, null);
      hCmd.addParam(agentID);

      broadcastToReplicas(hCmd, EXCLUDE_MYSELF);
    }

    private void handleInformStateChanged(VerticalCommand cmd) throws IMTPException, NotFoundException, ServiceException {
View Full Code Here

      AID agentID = (AID) params[0];
      String newState = (String) params[1];

      if (newState.equals(jade.domain.FIPAAgentManagement.AMSAgentDescription.SUSPENDED)) {
        GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_SUSPENDEDAGENT, MainReplicationSlice.NAME, null);
        hCmd.addParam(agentID);

        broadcastToReplicas(hCmd, EXCLUDE_MYSELF);
      } else if (newState.equals(jade.domain.FIPAAgentManagement.AMSAgentDescription.ACTIVE)) {
        GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_RESUMEDAGENT, MainReplicationSlice.NAME, null);
        hCmd.addParam(agentID);
View Full Code Here

        hCmd.addParam(agentID);

        broadcastToReplicas(hCmd, EXCLUDE_MYSELF);
      } else if (newState.equals(jade.domain.FIPAAgentManagement.AMSAgentDescription.ACTIVE)) {
        GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_RESUMEDAGENT, MainReplicationSlice.NAME, null);
        hCmd.addParam(agentID);

        broadcastToReplicas(hCmd, EXCLUDE_MYSELF);
      }

    }
View Full Code Here

      Object[] params = cmd.getParams();
      MTPDescriptor mtp = (MTPDescriptor) params[0];
      ContainerID cid = (ContainerID) params[1];

      GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_NEWMTP, MainReplicationSlice.NAME, null);
      hCmd.addParam(mtp);
      hCmd.addParam(cid);

      broadcastToReplicas(hCmd, EXCLUDE_MYSELF);
    }
View Full Code Here

      MTPDescriptor mtp = (MTPDescriptor) params[0];
      ContainerID cid = (ContainerID) params[1];

      GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_NEWMTP, MainReplicationSlice.NAME, null);
      hCmd.addParam(mtp);
      hCmd.addParam(cid);

      broadcastToReplicas(hCmd, EXCLUDE_MYSELF);
    }

    private void handleDeadMTP(VerticalCommand cmd) throws IMTPException, ServiceException {
View Full Code Here

      Object[] params = cmd.getParams();
      MTPDescriptor mtp = (MTPDescriptor) params[0];
      ContainerID cid = (ContainerID) params[1];

      GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_DEADMTP, MainReplicationSlice.NAME, null);
      hCmd.addParam(mtp);
      hCmd.addParam(cid);

      broadcastToReplicas(hCmd, EXCLUDE_MYSELF);
    }
  } // End of CommandIncomingFilter class
View Full Code Here

      MTPDescriptor mtp = (MTPDescriptor) params[0];
      ContainerID cid = (ContainerID) params[1];

      GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_DEADMTP, MainReplicationSlice.NAME, null);
      hCmd.addParam(mtp);
      hCmd.addParam(cid);

      broadcastToReplicas(hCmd, EXCLUDE_MYSELF);
    }
  } // End of CommandIncomingFilter class
View Full Code Here

        myPlatformManager.removeReplica(monitoredSvcMgr, false);
        myPlatformManager.removeNode(new NodeDescriptor(n), false);

        // Broadcast a 'removeReplica()' method (exclude yourself from bcast)
        GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_REMOVEREPLICA, MainReplicationSlice.NAME, null);
        hCmd.addParam(monitoredSvcMgr);
        hCmd.addParam(new Integer(monitoredLabel));
        broadcastToReplicas(hCmd, EXCLUDE_MYSELF);

        int oldLabel = myLabel;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.