org.objectweb.jeremie.libs.services.registry
Class LocateRegistry

java.lang.Object
  extended byorg.objectweb.jeremie.libs.services.registry.LocateRegistry

public class LocateRegistry
extends java.lang.Object

Provides an interface for applications to obtain a bootstrap local stub for a Jeremie registry running on a given host and port.

If not specified, the host defaults to the local machine.

If not specified, the port defaults to the value defined under the name "/jeremie/registry/default_port" in the bootstrap configuration. If this name is not bound in the bootstrap configuration, the port used is 12340.

See Also:
Registry

Method Summary
static java.rmi.registry.Registry createRegistry(int port)
          Creates and exports a Jeremie registry on the local host on the specified port.
static java.rmi.registry.Registry getRegistry()
          Creates a bootstrap local stub for a Jeremie registry running on the local machine and using the default port.
static java.rmi.registry.Registry getRegistry(int port)
          Creates a bootstrap local stub for a Jeremie registry running on the local machine and using the specified port.
static java.rmi.registry.Registry getRegistry(java.lang.String host)
          Creates a bootstrap local stub for a Jeremie registry running on the specified host and using the default port.
static java.rmi.registry.Registry getRegistry(java.lang.String host, int port)
          Creates a bootstrap local stub for a Jeremie registry running on the specified host and using the specified port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRegistry

public static java.rmi.registry.Registry getRegistry()
                                              throws java.rmi.RemoteException
Creates a bootstrap local stub for a Jeremie registry running on the local machine and using the default port.

Returns:
a stub for the Registry
Throws:
java.rmi.RemoteException - if something goes wrong

getRegistry

public static java.rmi.registry.Registry getRegistry(int port)
                                              throws java.rmi.RemoteException
Creates a bootstrap local stub for a Jeremie registry running on the local machine and using the specified port.

Returns:
a stub for the Registry
Throws:
java.rmi.RemoteException - if something goes wrong

getRegistry

public static java.rmi.registry.Registry getRegistry(java.lang.String host)
                                              throws java.rmi.RemoteException
Creates a bootstrap local stub for a Jeremie registry running on the specified host and using the default port.

Returns:
a stub for the Registry
Throws:
java.rmi.RemoteException - if something goes wrong

getRegistry

public static java.rmi.registry.Registry getRegistry(java.lang.String host,
                                                     int port)
                                              throws java.rmi.RemoteException
Creates a bootstrap local stub for a Jeremie registry running on the specified host and using the specified port.

Returns:
a stub for the Registry
Throws:
java.rmi.RemoteException - if something goes wrong

createRegistry

public static java.rmi.registry.Registry createRegistry(int port)
                                                 throws java.rmi.RemoteException
Creates and exports a Jeremie registry on the local host on the specified port.

Returns:
a handle on the local Registry
Throws:
java.rmi.RemoteException - if something goes wrong