ibis.rmi.registry
Class LocateRegistry

java.lang.Object
  extended by ibis.rmi.registry.LocateRegistry

public final class LocateRegistry
extends Object

The LocateRegistry class is a container class for methods that are used to obtain a reference to a remote registry or to create a registry.


Method Summary
static Registry createRegistry(int port)
          Creates and exports a Registry on the local host.
static Registry createRegistry(int port, RMIClientSocketFactory c, RMIServerSocketFactory s)
          Creates and exports a Registry on the local host.
static Registry getRegistry()
          Returns a reference to the remote Registry for the local host on the default port.
static Registry getRegistry(int port)
          Returns a reference to the remote Registry for the local host on the specified port.
static Registry getRegistry(String host)
          Returns a reference to the remote Registry for the specified host on the default port.
static Registry getRegistry(String host, int port)
          Returns a reference to the remote Registry for the specified host on the specified port.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRegistry

public static Registry getRegistry()
Returns a reference to the remote Registry for the local host on the default port.

Returns:
a stub for the remote registry.

getRegistry

public static Registry getRegistry(int port)
Returns a reference to the remote Registry for the local host on the specified port.

Parameters:
port - the port on which the registry accepts requests
Returns:
a stub for the remote registry.

getRegistry

public static Registry getRegistry(String host)
Returns a reference to the remote Registry for the specified host on the default port.

Parameters:
host - host for the remote registry
Returns:
a stub for the remote registry.

getRegistry

public static Registry getRegistry(String host,
                                   int port)
Returns a reference to the remote Registry for the specified host on the specified port.

Parameters:
host - host for the remote registry
port - the port on which the registry accepts requests
Returns:
a stub for the remote registry.

createRegistry

public static Registry createRegistry(int port)
                               throws RemoteException
Creates and exports a Registry on the local host. This registry will accept requests on the specified port.

Parameters:
port - the port on which the registry accepts requests
Returns:
the registry.
Throws:
RemoteException - if the registry could not be created.

createRegistry

public static Registry createRegistry(int port,
                                      RMIClientSocketFactory c,
                                      RMIServerSocketFactory s)
                               throws RemoteException
Creates and exports a Registry on the local host. This registry will accept requests on the specified port.

Parameters:
port - the port on which the registry accepts requests
c - client socket factory (ignored in ibis)
s - server socket factory (ignored in ibis)
Returns:
the registry.
Throws:
RemoteException - if the registry could not be created.


The Ibis project