Package jade.core

Examples of jade.core.NodeDescriptor


          command.addParam(name);
          break;
      }
   
      case PlatformManagerStub.ADD_NODE: {
          NodeDescriptor desc = (NodeDescriptor)command.getParamAt(0);
          Vector services = (Vector)command.getParamAt(1);
          boolean propagated = ((Boolean)command.getParamAt(2)).booleanValue();
   
          // Execute command...
          String name = impl.addNode(desc, services, propagated);
   
          command.reset(Command.OK);
          command.addParam(name);
          break;
      }
   
      case PlatformManagerStub.REMOVE_NODE: {
          NodeDescriptor desc = (NodeDescriptor)command.getParamAt(0);
          boolean propagated = ((Boolean)command.getParamAt(1)).booleanValue();
   
          // Execute command...
          impl.removeNode(desc, propagated);
   
          command.reset(Command.OK);
          break;
      }
   
      case PlatformManagerStub.ADD_SLICE: {
          ServiceDescriptor svc = (ServiceDescriptor)command.getParamAt(0);
          NodeDescriptor desc = (NodeDescriptor)command.getParamAt(1);
          boolean propagated = ((Boolean)command.getParamAt(2)).booleanValue();
   
          // Execute command...
          impl.addSlice(svc, desc, propagated);
   
View Full Code Here


  }
 
  void pingNode(String nodeID) throws IMTPException {
    try {
      // This method is invoked by the UDPMonitorServer --> it can only be invoked on a Main Container
      NodeDescriptor dsc = mainContainer.getContainerNode(new ContainerID(nodeID, null));
      dsc.getNode().ping(false);
    }
    catch (NotFoundException nfe) {
      // Node unknown! This should never happen. DO as if it was unreachable
      throw new IMTPException("Unknown node");
    }
View Full Code Here

      // Temporarily store the slices into an array...
      MainReplicationSlice[] temp = new MainReplicationSlice[slices.length];
      // Besides notifying GADT information, the MainReplication slice that will monitor this newly started
      // slice will also have to issue a NEW_NODE VCommand and a NEW_SLICE VCommands for each local service
      // to allow services to notify service specific information
      NodeDescriptor dsc = myContainer.getNodeDescriptor();
      Vector localServices = myContainer.getServiceManager().getLocalServices();
      String localNodeName = getLocalNode().getName();
      for (int i = 0; i < slices.length; i++) {
        try {
          MainReplicationSlice slice = (MainReplicationSlice) slices[i];
View Full Code Here

          cmd.setReturnValue(getPlatformManagerAddress());
        } else if (cmdName.equals(MainReplicationSlice.H_ADDREPLICA)) {
          String sliceName = (String) params[0];
          String smAddr = (String) params[1];
          int sliceIndex = ((Integer) params[2]).intValue();
          NodeDescriptor dsc = (NodeDescriptor) params[3];
          Vector services = (Vector) params[4];
          addReplica(sliceName, smAddr, sliceIndex, dsc, services);
        } else if (cmdName.equals(MainReplicationSlice.H_REMOVEREPLICA)) {
          String smAddr = (String) params[0];
          int sliceIndex = ((Integer) params[1]).intValue();
View Full Code Here

          feeder = new AMSEventQueueFeeder(new InputQueue(), myContainer.getID());
          myMain.addListener(feeder);
        }

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

TOP

Related Classes of jade.core.NodeDescriptor

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.