Package java.rmi.registry

Examples of java.rmi.registry.Registry.lookup()


   * @throws RemoteException
   * @throws NotBoundException
   */
  public ServerSideClientCart() throws AccessException, RemoteException, NotBoundException {
    Registry registry = LocateRegistry.getRegistry(12000);
    this.database = (DatabaseInterface)registry.lookup(DatabaseInterface.class.getCanonicalName());
   
    this.hashMap = new HashMap<Integer, Integer>();
  }

  /**
 
View Full Code Here


    this.clientHandlers= new LinkedList<ClientHandler>();
    try {
      // get Registry on local host
      Registry registry= LocateRegistry.getRegistry("localhost", 6666);
      // lookup DBServer-object on registry
      dbserverInterface= (DBServerInterface) registry.lookup("DBServer");
    } catch (Exception e) {
      DataStore.logger.error(e.toString());
    }
  }
 
View Full Code Here

   * @throws NotBoundException
   */
  public void setBootstrap(String hostname) throws RemoteException, NotBoundException {
    P2PMemberController.logger.debug("Controller: get bootstrap node");
    Registry registry = LocateRegistry.getRegistry(hostname, P2PMemberController.PORT);
    this.bootstrap = (NodeInterface)registry.lookup(Node.class.getCanonicalName());
  }
 
  /**
   * Register the own node in the ring.
   *
 
View Full Code Here

   */
  public boolean bootstrapExists(String hostname) throws RemoteException, NotBoundException {
    P2PMemberController.logger.debug("Controller: check if the bootstrap node exists");
    try {
      Registry registry = LocateRegistry.getRegistry(hostname, P2PMemberController.PORT);
      /*Object object = */registry.lookup(Node.class.getCanonicalName());
      return true;
    } catch (NotBoundException e) {
      return false;
    } catch (RemoteException e) {
      return false;
View Full Code Here

    rmiNode.setConnected(false);
   
    try {
      registry = LocateRegistry.getRegistry(rmiNode.getNode().getAddress(),
            (new Integer(rmiNode.getNode().getPort())));
      rmi = (RemoteInterface)(registry.lookup("RemoteServer"));
      ret = true;
      rmiNode.setConnected(true);
    } catch (RemoteException e) {
      logger.error(e.getMessage());
      registry = null;
View Full Code Here

        SERVER_PORT_PROPERTY, DEFAULT_SERVER_PORT, 1, 65535);
      }

      Registry rmiRegistry = LocateRegistry.getRegistry(host, serverPort);
      serverProxy = (WatchdogServer)
    rmiRegistry.lookup(WatchdogServerImpl.WATCHDOG_SERVER_NAME);

            int jmxPort = wrappedProps.getIntProperty(
                    StandardProperties.SYSTEM_JMX_REMOTE_PORT, -1);
      localNodeId = dataService.getLocalNodeId();
            if (startServer) {
View Full Code Here

            }         
         
            // TODO This code assumes that the server has already been started.
            // Perhaps it'd be better to block until the server is available?
            Registry registry = LocateRegistry.getRegistry(host, port);
            server = (NodeMappingServer) registry.lookup(
                         NodeMappingServerImpl.SERVER_EXPORT_NAME);     
           
            // Export our client object for server callbacks.
            int clientPort = wrappedProps.getIntProperty(
                                        CLIENT_PORT_PROPERTY,
View Full Code Here

        int port = wrappedProps.getIntProperty(
                LabelPropagationServer.SERVER_PORT_PROPERTY,
                LabelPropagationServer.DEFAULT_SERVER_PORT, 0, 65535);
        // Look up our server
        Registry registry = LocateRegistry.getRegistry(host, port);
        server = (LPAServer) registry.lookup(
                         LabelPropagationServer.SERVER_EXPORT_NAME);

        // Register our node listener with the watchdog service.
        wdog.addNodeListener(new NodeFailListener());
View Full Code Here

      }
      try {
    if (!noRmi) {
        Registry registry = LocateRegistry.getRegistry(
      serverHost, serverPort);
        return (DataStoreServer) registry.lookup(
      "DataStoreServer");
    } else {
        return new DataStoreClientRemote(serverHost, serverPort);
    }
      } catch (IOException e) {
View Full Code Here

            int port = wrappedProps.getIntProperty(
                    DistGraphBuilderServerImpl.SERVER_PORT_PROPERTY,
                    DistGraphBuilderServerImpl.DEFAULT_SERVER_PORT, 0, 65535);
            // Look up our server
            Registry registry = LocateRegistry.getRegistry(host, port);
            server = (DistGraphBuilderServer) registry.lookup(
                             DistGraphBuilderServerImpl.SERVER_EXPORT_NAME);
            serverImpl = null;
        }
    }
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.