Package jade.core

Examples of jade.core.GenericCommand.addParam()


        failure.setContent(content);

        try {
            GenericCommand command = new GenericCommand(MessagingSlice.SEND_MESSAGE,
                    MessagingSlice.NAME, null);
            command.addParam(theAMS);
            command.addParam(new GenericMessage(failure));
            command.addParam((AID) (failure.getAllReceiver().next()));

            // FIXME: We should set the AMS principal and credentials
            submit(command);
View Full Code Here


        try {
            GenericCommand command = new GenericCommand(MessagingSlice.SEND_MESSAGE,
                    MessagingSlice.NAME, null);
            command.addParam(theAMS);
            command.addParam(new GenericMessage(failure));
            command.addParam((AID) (failure.getAllReceiver().next()));

            // FIXME: We should set the AMS principal and credentials
            submit(command);
        } catch (ServiceException se) {
View Full Code Here

        try {
            GenericCommand command = new GenericCommand(MessagingSlice.SEND_MESSAGE,
                    MessagingSlice.NAME, null);
            command.addParam(theAMS);
            command.addParam(new GenericMessage(failure));
            command.addParam((AID) (failure.getAllReceiver().next()));

            // FIXME: We should set the AMS principal and credentials
            submit(command);
        } catch (ServiceException se) {
            // It should never happen
View Full Code Here

public class TopicManagementProxy extends SliceProxy implements TopicManagementSlice {
 
  public void register(AID aid, AID topic) throws IMTPException {
    try {
      GenericCommand cmd = new GenericCommand(H_REGISTER, TopicManagementService.NAME, null);
      cmd.addParam(aid);
      cmd.addParam(topic);
     
      Node n = getNode();
      Object result = n.accept(cmd);
      if((result != null) && (result instanceof Throwable)) {
View Full Code Here

 
  public void register(AID aid, AID topic) throws IMTPException {
    try {
      GenericCommand cmd = new GenericCommand(H_REGISTER, TopicManagementService.NAME, null);
      cmd.addParam(aid);
      cmd.addParam(topic);
     
      Node n = getNode();
      Object result = n.accept(cmd);
      if((result != null) && (result instanceof Throwable)) {
        if(result instanceof IMTPException) {
View Full Code Here

  }
 
  public void deregister(AID aid, AID topic) throws IMTPException
    try {
      GenericCommand cmd = new GenericCommand(H_DEREGISTER, TopicManagementService.NAME, null);
      cmd.addParam(aid);
      cmd.addParam(topic);
     
      Node n = getNode();
      Object result = n.accept(cmd);
      if((result != null) && (result instanceof Throwable)) {
View Full Code Here

 
  public void deregister(AID aid, AID topic) throws IMTPException
    try {
      GenericCommand cmd = new GenericCommand(H_DEREGISTER, TopicManagementService.NAME, null);
      cmd.addParam(aid);
      cmd.addParam(topic);
     
      Node n = getNode();
      Object result = n.accept(cmd);
      if((result != null) && (result instanceof Throwable)) {
        if(result instanceof IMTPException) {
View Full Code Here

        }
        else if(cmdName.equals(AgentMobilitySlice.H_MOVEAGENT)) {
          GenericCommand gCmd = new GenericCommand(AgentMobilityHelper.REQUEST_MOVE, AgentMobilitySlice.NAME, null);
          AID agentID = (AID)params[0];
          Location where = (Location)params[1];
          gCmd.addParam(agentID);
          gCmd.addParam(where);
         
          result = gCmd;
        }
        else if(cmdName.equals(AgentMobilitySlice.H_COPYAGENT)) {
View Full Code Here

        else if(cmdName.equals(AgentMobilitySlice.H_MOVEAGENT)) {
          GenericCommand gCmd = new GenericCommand(AgentMobilityHelper.REQUEST_MOVE, AgentMobilitySlice.NAME, null);
          AID agentID = (AID)params[0];
          Location where = (Location)params[1];
          gCmd.addParam(agentID);
          gCmd.addParam(where);
         
          result = gCmd;
        }
        else if(cmdName.equals(AgentMobilitySlice.H_COPYAGENT)) {
          GenericCommand gCmd = new GenericCommand(AgentMobilityHelper.REQUEST_CLONE, AgentMobilitySlice.NAME, null);
View Full Code Here

        else if(cmdName.equals(AgentMobilitySlice.H_COPYAGENT)) {
          GenericCommand gCmd = new GenericCommand(AgentMobilityHelper.REQUEST_CLONE, AgentMobilitySlice.NAME, null);
          AID agentID = (AID)params[0];
          Location where = (Location)params[1];
          String newName = (String)params[2];
          gCmd.addParam(agentID);
          gCmd.addParam(where);
          gCmd.addParam(newName);
         
          result = gCmd;
        }
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.