Package java.rmi.registry

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


    String host = accessPointURI.getHost();
    int port = accessPointURI.getPort();
    String path = accessPointURI.getPath();
    log.debug("Connecting to " + host + ":" + port);
    Registry registry = LocateRegistry.getRegistry(host, port);
    subscriptionListenerPort = (UDDISubscriptionListenerPortType) registry.lookup(path);
  }

  public DispositionReport notifySubscriptionListener(NotifySubscriptionListener body) throws DispositionReportFaultMessage, RemoteException {
    return subscriptionListenerPort.notifySubscriptionListener(body);
  }
View Full Code Here


    }

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

      disconnect();
    }
    try {
      System.setSecurityManager(null);
      Registry reg = LocateRegistry.getRegistry(serverName, port);
      this.server = (Server) reg.lookup(Config.remoteServer);
      this.userName = userName;
      this.client = new Client(this, frame, userName);
      sessionId = server.registerClient(userName, client.getId());
      callbackDaemon = new CallbackClientDaemon(sessionId, client, server);
      serverState = server.getServerState();
View Full Code Here

                port = Integer.parseInt(hp[1]);
            }

            // Try SSL
            Registry registry = LocateRegistry.getRegistry(host,port, new SslRMIClientSocketFactory());
            sslStub = (RMIServer) registry.lookup("jmxrmi");
            ssl = true;
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
View Full Code Here

        } catch (IOException e) {
            e.printStackTrace();
            // Try regular
            try {
                Registry registry = LocateRegistry.getRegistry(url.getHost(),url.getPort());
                sslStub = (RMIServer) registry.lookup("jmxrmi");
            } catch (RemoteException e1) {
                e1.printStackTrace();
            } catch (NotBoundException e1) {
                e1.printStackTrace();
            }
View Full Code Here

                        //binding to the RMI Registry
                        registry.bind(path, rmiSubscriptionListenerService);

                        //double check that the service is bound in the local Registry
                        Registry registry2 = LocateRegistry.getRegistry(rmiEndPoint.getHost(), rmiEndPoint.getPort());
                        registry2.lookup(rmiEndPoint.getPath());


                } catch (Exception e2) {
                        // TODO Auto-generated catch block
                        e2.printStackTrace();
View Full Code Here

    {
        Registry reg = null;
        try
        {
            reg = getRegistry();
            return reg.lookup( name );
        }
        catch( NotBoundException e )
        {
            throw new ObjectProviderException( "Name " + name + " not found in registry at " + host + ":" + port + ".",
                                               e );
View Full Code Here

      //binding to the RMI Registry
      registry.bind(path,rmiSubscriptionListenerService);
     
      //double check that the service is bound in the local Registry
      Registry registry2 = LocateRegistry.getRegistry(rmiEndPoint.getHost(), rmiEndPoint.getPort());
      registry2.lookup(rmiEndPoint.getPath());
          
           
    } catch (Exception e2) {
      // TODO Auto-generated catch block
      e2.printStackTrace();
View Full Code Here

        //
        Registry registry;
        try {
            registry = LocateRegistry.getRegistry(registryHostName, registryPort, sslRMIClientSocketFactory);
            try {
                stub = (RMIServer) registry.lookup("jmxrmi");
            } catch (NotBoundException nbe) {
                throw (IOException) new IOException(nbe.getMessage()).initCause(nbe);
            }
            sslRegistry = true;
        } catch (IOException e) {
View Full Code Here

            }
            sslRegistry = true;
        } catch (IOException e) {
            registry = LocateRegistry.getRegistry(registryHostName, registryPort);
            try {
                stub = (RMIServer) registry.lookup("jmxrmi");
            } catch (NotBoundException nbe) {
                throw (IOException) new IOException(nbe.getMessage()).initCause(nbe);
            }
            sslRegistry = false;
        }
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.