Package java.rmi.registry

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


      }
      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


        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);
            if (startServer) {
                localNodeId = serverImpl.localNodeId;
View Full Code Here

  }

  private static Object callPrologServer(String host,String portName,Object goal)
      throws ConnectException,NotBoundException,AccessException,RemoteException {
    Registry registry=LocateRegistry.getRegistry(host);
    PrologService stub=(PrologService)registry.lookup(portName);
    return stub.serverCallProlog(goal);
  }

  private static void rliSleep(int secs) {
    if(RLIAdaptor.trace)
View Full Code Here

  }

  public static Object clientPrologCall(String host,String portName,Object goal) {
    try {
      Registry registry=LocateRegistry.getRegistry(host);
      PrologService stub=(PrologService)registry.lookup(portName);
      Object answer=stub.serverCallProlog(goal);
      return answer;
    } catch(Exception e) {

      System.err.println("rli_call error: "+e+",port="+portName+",CALLING=>"+goal);
View Full Code Here

  }

  public static Object rli_in(String host,String portName) {
    try {
      Registry registry=LocateRegistry.getRegistry(host);
      PrologService stub=(PrologService)registry.lookup(portName);
      Object answer=stub.rli_in();
      return answer;
    } catch(Exception e) {
      System.err.println("Error in rli_in: "+e.toString()+",port="+portName);
      if(RLIAdaptor.trace)
View Full Code Here

  }

  public static void rli_out(String host,String portName,Object T) {
    try {
      Registry registry=LocateRegistry.getRegistry(host);
      PrologService stub=(PrologService)registry.lookup(portName);
      stub.rli_out(T);
    } catch(Exception e) {
      System.err.println("Error in rli_out: "+e.toString()+",port="+portName+",term="+T);
      if(RLIAdaptor.trace)
        e.printStackTrace();
View Full Code Here

  public ExternalRemoteServerContext login(String username, String password)
      throws RemoteException, LoginException {
    System.setSecurityManager(null);
    Registry registry = LocateRegistry.getRegistry(server, port);
    try {
      cspokerServer = (ExternalRemoteCSPokerServer) registry.lookup("CSPokerServer");
    } catch (NotBoundException exception) {
      throw new RemoteException("CSPokerServer not found in registry.", exception);
    }
    ExternalRemoteServerContext context = cspokerServer.login(username, password);
    return new ServerContextStub(context);
View Full Code Here

    }

    public Remote getRemote() throws RemoteException, NotBoundException {
        if (remote == null) {
            Registry registry = endpoint.getRegistry();
            remote = registry.lookup(endpoint.getName());
        }
        return remote;
    }

}
View Full Code Here

      {
         storeLocalConfig(configuration);
         String host = locator.getHost();
         int port = getRegistryPort(locator);
         Registry regsitry = LocateRegistry.getRegistry(host, port);
         Remote remoteObj = regsitry.lookup("remoting/RMIServerInvoker/" + locator.getPort());
         log.debug("Remote RMI Stub: " + remoteObj);
         setServerStub((RMIServerInvokerInf) remoteObj);
         connected = true;
      }
      catch(Exception e)
View Full Code Here

        try {
            registry = LocateRegistry.getRegistry(host, portNumber);

            if (registry != null) {
                remoteService = registry.lookup(svcName);
            }
        } catch (RemoteException e) {
            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
            rmiExec.setStackTrace(e.getStackTrace());
            throw rmiExec;
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.