Package jade.core

Examples of jade.core.GenericCommand


    }
  }
 
  public void addRoute(MTPDescriptor mtp, String sliceName) throws IMTPException, ServiceException {
    try {
      GenericCommand cmd = new GenericCommand(H_ADDROUTE, NAME, null);
      cmd.addParam(mtp);
      cmd.addParam(sliceName);
     
     
      Node n = getNode();
      Object result = n.accept(cmd);
      if((result != null) && (result instanceof Throwable)) {
View Full Code Here


    }
  }
 
  public void removeRoute(MTPDescriptor mtp, String sliceName) throws IMTPException, ServiceException {
    try {
      GenericCommand cmd = new GenericCommand(H_REMOVEROUTE, NAME, null);
      cmd.addParam(mtp);
      cmd.addParam(sliceName);
     
     
      Node n = getNode();
      Object result = n.accept(cmd);
      if((result != null) && (result instanceof Throwable)) {
View Full Code Here

    }
  }

  public void newAlias(AID alias, AID agent) throws IMTPException {
    try {
      GenericCommand cmd = new GenericCommand(H_NEWALIAS, NAME, null);
      cmd.addParam(alias);
      cmd.addParam(agent);
         
      Node n = getNode();
      Object result = n.accept(cmd);
      if((result != null) && (result instanceof Throwable)) {
        if(result instanceof IMTPException) {
View Full Code Here

    }
  }

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

    }
  }
 
  public void currentAliases(Hashtable aliases) throws IMTPException {
    try {
      GenericCommand cmd = new GenericCommand(H_CURRENTALIASES, NAME, null);
      cmd.addParam(aliases);
         
      Node n = getNode();
      Object result = n.accept(cmd);
      if((result != null) && (result instanceof Throwable)) {
        if(result instanceof IMTPException) {
View Full Code Here

    }
  }

  public void transferLocalAliases(AID agent, List aliases) throws IMTPException {
    try {
      GenericCommand cmd = new GenericCommand(H_TRANSFERLOCALALIASES, NAME, null);
      cmd.addParam(agent);
      cmd.addParam(aliases);
         
      Node n = getNode();
      Object result = n.accept(cmd);
      if((result != null) && (result instanceof Throwable)) {
        if(result instanceof IMTPException) {
View Full Code Here

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

      GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_NEWTOOL, MainReplicationSlice.NAME, null);
      hCmd.addParam(tool);

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

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

      GenericCommand hCmd = new GenericCommand(MainReplicationSlice.H_DEADTOOL, MainReplicationSlice.NAME, null);
      hCmd.addParam(tool);

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

        Object[] params = cmd.getParams();

        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);
    }
View Full Code Here

TOP

Related Classes of jade.core.GenericCommand

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.