|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjgroup.relacs.registry.RelacsRegistryLocator
public final class RelacsRegistryLocator
RelacsRegistryLocator
is used to obtain a bootstrap
reference to the Jgroup dependable registry, or to create a Jgroup
dependable registry instance on the local machine. Every instance
of the Jgroup registry service is based on two remote registries:
the standard local registry and the replicated one. The standard
local registry is used to retrieve a reference for the replicated
remote registry. The access port for these registries are
configured in the XML configuration file.
Constructor Summary | |
---|---|
RelacsRegistryLocator()
Will be used to obtain an instance of RegistryLocator. |
Method Summary | |
---|---|
DependableRegistry |
createRegistry()
Creates and exports a dependable registry replica on the local host listening for incoming requests on an the port specified in the system configuration file. |
DependableRegistry |
createRegistry(java.rmi.server.RMIClientSocketFactory csf,
java.rmi.server.RMIServerSocketFactory ssf)
Creates and exports a dependable registry replica on the local host listening for incoming requests on an the port specified in the system configuration file. |
LookupRegistry |
getLookupRegistry()
Returns a LookupRegistry interface, which can be used by clients to lookup a remote reference from registry. |
DependableRegistry |
getRegistry()
Returns a proxy for the dependable registry service. |
DependableRegistry |
getRegistry(java.rmi.server.RMIClientSocketFactory csf)
Returns a proxy for the dependable registry service formed by all registry replica instances found within the distributed system configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RelacsRegistryLocator()
Method Detail |
---|
public DependableRegistry getRegistry() throws JgroupException, java.rmi.RemoteException
getRegistry
in interface RegistryLocator
java.rmi.RemoteException
- Raised if the proxy could not be obtained.
ConfigurationException
- Raised if there is a problem with the distributed system
configuration data.
JgroupException
public DependableRegistry getRegistry(java.rmi.server.RMIClientSocketFactory csf) throws JgroupException, java.rmi.RemoteException
Communication with this remote registry will use the supplied
Note that the method returns the same group reference (variable
drProxy
) for the dependable registry upon multiple
invocations of this method. However, the threads continue to run
also after the first invocation, and thus the group proxy may be
augmented with further dependable registry replicas. This means
that, although the first (few) use(s) of the returned group proxy
may have accessed only a subset of the available DR replicas,
future invocations on the group proxy will include all available
DR replicas.
getRegistry
in interface RegistryLocator
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.
java.rmi.RemoteException
- If a proxy could not be obtained; probably due to unavailability
of any registry replica instances.
ConfigurationException
- Raised if there is a problem with the distributed system
configuration data.
JgroupException
public DependableRegistry createRegistry() throws JgroupException, java.rmi.RemoteException
createRegistry
in interface RegistryLocator
java.rmi.RemoteException
- Raised if the registry could not be exported.
JgroupException
- Raised if a registry instance could not be created.
ConfigurationException
- Raised if there was a problem parsing the distributed system
configuration file.public DependableRegistry createRegistry(java.rmi.server.RMIClientSocketFactory csf, java.rmi.server.RMIServerSocketFactory ssf) throws java.rmi.RemoteException, JgroupException
The new instance of the dependable registry listens to incoming
requests using a ServerSocket
created from the
supplied RMIServerSocketFactory
. A client that
receives a reference to this registry will then use a
Socket
created from the supplied
RMIClientSocketFactory
.
createRegistry
in interface RegistryLocator
csf
- Client-side Socket
factory used to make connections
to the registry.ssf
- Server-side ServerSocket
factory used to accept
connections to the registry.
java.rmi.RemoteException
- Raised if the registry could not be exported.
JgroupException
- Raised if a registry instance could not be created.
ConfigurationException
- Raised if there was a problem parsing the distributed system
configuration file.public LookupRegistry getLookupRegistry() throws JgroupException, java.rmi.RemoteException
RegistryLocator
getLookupRegistry
in interface RegistryLocator
JgroupException
java.rmi.RemoteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |