jgroup.reference
Interface RegistryLocator


public interface RegistryLocator

This interface will be moved to another package. It is used internally to retrieve registry proxies and create registry replicas.

Since:
Jgroup 0.8
Author:
Alberto Montresor

Method Summary
 DependableRegistry createRegistry(java.lang.Object[] conf)
          Creates and exports a dependable registry replica on the local host that listen to incoming requests on an anonymous communication port.
 DependableRegistry createRegistry(java.lang.Object[] conf, int port)
          Creates and exports a dependable registry replica on the local host that listen to incoming requests on the given port communication port.
 DependableRegistry createRegistry(java.lang.Object[] conf, int port, java.rmi.server.RMIClientSocketFactory csf, java.rmi.server.RMIServerSocketFactory ssf)
          Creates and exports a dependable registry replica on the local host that listen to incoming requests on the given port communication port.
 DependableRegistry getRegistry(DistributedSystem ds)
          Returns a proxy for the dependable registry service on the specified distributed system.
 DependableRegistry getRegistry(DistributedSystem ds, int port)
          Returns a proxy for the dependable registry service on the specified distributed system and port.
 DependableRegistry getRegistry(DistributedSystem ds, int port, java.rmi.server.RMIClientSocketFactory csf)
          Returns a proxy for the dependable registry service on the specified distributed system and port.
 

Method Detail

getRegistry

public DependableRegistry getRegistry(DistributedSystem ds)
                               throws java.rmi.RemoteException
Returns a proxy for the dependable registry service on the specified distributed system.
Parameters:
ds - the distributed system in which the dependable registry replicas are expected to run
Returns:
a proxy for the dependable registry service
Throws:
java.rmi.RemoteException - if the proxy could not be obtained

getRegistry

public DependableRegistry getRegistry(DistributedSystem ds,
                                      int port)
                               throws java.rmi.RemoteException
Returns a proxy for the dependable registry service on the specified distributed system and port.
Parameters:
ds - the distributed system in which the dependable registry replicas are expected to run
port - port on which distributed replicas are listening
Returns:
a proxy for the dependable registry service
Throws:
java.rmi.RemoteException - if the proxy could not be obtained

getRegistry

public DependableRegistry getRegistry(DistributedSystem ds,
                                      int port,
                                      java.rmi.server.RMIClientSocketFactory csf)
                               throws java.rmi.RemoteException
Returns a proxy for the dependable registry service on the specified distributed system and port.

Communication with this remote registry will use the supplied RMIClientSocketFactory csf to create socket connections to the dependable registry on the distributed system and port.

Parameters:
ds - the distributed system in which the dependable registry replicas are expected to run
port - port on which distributed replicas are listening
csf - client-side Socket factory used to make connections to the dependable registry. If csf is null, then the default client-side socket factory will be used
Returns:
a proxy for the dependable registry service
Throws:
java.rmi.RemoteException - if the proxy could not be obtained

createRegistry

public DependableRegistry createRegistry(java.lang.Object[] conf)
                                  throws java.rmi.RemoteException,
                                         JgroupException
Creates and exports a dependable registry replica on the local host that listen to incoming requests on an anonymous communication port. Objects contained conf are used by Jgroup to configure the group communication; the distributed system description must be inclued in this array.
Parameters:
conf - configuration information
Returns:
the new dependable registry replica.
Throws:
java.rmi.RemoteException - if the registry could not be exported
JgroupException - Generic exception raised by Jgroup.
DSException - raised when the distributed system configuration object contains an error

createRegistry

public DependableRegistry createRegistry(java.lang.Object[] conf,
                                         int port)
                                  throws java.rmi.RemoteException,
                                         JgroupException
Creates and exports a dependable registry replica on the local host that listen to incoming requests on the given port communication port. Objects contained conf are used by Jgroup to configure the group communication; the distributed system description must be inclued in this array.
Parameters:
conf - configuration information
port - port used for RMI communications
Returns:
the new dependable registry replica.
Throws:
java.rmi.RemoteException - if the registry could not be exported
JgroupException - Generic exception raised by Jgroup.
DSException - raised when the distributed system configuration object contains an error

createRegistry

public DependableRegistry createRegistry(java.lang.Object[] conf,
                                         int port,
                                         java.rmi.server.RMIClientSocketFactory csf,
                                         java.rmi.server.RMIServerSocketFactory ssf)
                                  throws java.rmi.RemoteException,
                                         JgroupException
Creates and exports a dependable registry replica on the local host that listen to incoming requests on the given port communication port. Objects contained conf are used by Jgroup to configure the group communication; the distributed system description must be inclued in this array. The new instance listens to incoming requests using a ServerSocket created from the supplied RMIServerSocketFactory. A client that receives a reference to this registry will use a Socket created from the supplied RMIClientSocketFactory.
Parameters:
conf - configuration information
port - port used for RMI communications
csf - client-side Socket factory used to make connections to the registry
ssf - server-side ServerSocket factory used to accept connections to the registry
Returns:
the new dependable registry replica.
Throws:
java.rmi.RemoteException - if the registry could not be exported
JgroupException - Generic exception raised by Jgroup.
DSException - raised when the distributed system configuration object contains an error