|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jgroup.registry.RegistryFactory
Class RegistryFactory
is used to obtain a proxy
to the dependable registry service, or to create a dependable
registry replica on the local machine.
// Questo dipende da come lo implemento io; nel futuro,
potrebbe essere diverso (basato su Jini).
Every instance of the dependable registry service is associated
with a standard RMI registry, which is used to retrieve a
unicast proxy for the replica.
to obtain 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. When the argument port
is used in a getRegistry
or a createRegistry method, it specifies the port used by the local registry.
The port used by the replicated registry is port+1
.
Field Summary | |
private static RegistryLocator |
loc
Group manager locator needed to obtain group managers |
static java.lang.String |
RESOURCE
|
Constructor Summary | |
private |
RegistryFactory()
Private constructor to disable public construction. |
Method Summary | |
static 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. |
static 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. |
static 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. |
static DependableRegistry |
getRegistry(DistributedSystem ds)
Returns a proxy for the dependable registry service on the specified distributed system. |
static DependableRegistry |
getRegistry(DistributedSystem ds,
int port)
Returns a proxy for the dependable registry service on the specified distributed system and port. |
static 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. |
private static void |
setLocator()
Construct locator |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final java.lang.String RESOURCE
private static RegistryLocator loc
Constructor Detail |
private RegistryFactory()
Method Detail |
private static void setLocator() throws java.rmi.RemoteException
public static DependableRegistry getRegistry(DistributedSystem ds) throws java.rmi.RemoteException
ds
- the distributed system in which the dependable registry
replicas are expected to runjava.rmi.RemoteException
- if the proxy could not be obtainedpublic static DependableRegistry getRegistry(DistributedSystem ds, int port) throws java.rmi.RemoteException
ds
- the distributed system in which the dependable registry
replicas are expected to runport
- port on which distributed replicas are listeningjava.rmi.RemoteException
- if the proxy could not be obtainedpublic static DependableRegistry getRegistry(DistributedSystem ds, int port, java.rmi.server.RMIClientSocketFactory csf) throws java.rmi.RemoteException
Communication with this remote registry will use the supplied
ds
- the distributed system in which the dependable registry
replicas are expected to runport
- port on which distributed replicas are listeningcsf
- client-side Socket factory used to make connections to
the dependable registry. If java.rmi.RemoteException
- if the proxy could not be obtainedpublic static DependableRegistry createRegistry(java.lang.Object[] conf) throws java.rmi.RemoteException, JgroupException
conf
- configuration informationjava.rmi.RemoteException
- if the registry could not be exportedJgroupException
- Generic exception raised by Jgroup.DSException
- raised when the distributed system configuration object contains an errorpublic static DependableRegistry createRegistry(java.lang.Object[] conf, int port) throws java.rmi.RemoteException, JgroupException
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.conf
- configuration informationport
- port used for RMI communicationsjava.rmi.RemoteException
- if the registry could not be exportedJgroupException
- Generic exception raised by Jgroup.DSException
- raised when the distributed system configuration object contains an errorpublic static DependableRegistry createRegistry(java.lang.Object[] conf, int port, java.rmi.server.RMIClientSocketFactory csf, java.rmi.server.RMIServerSocketFactory ssf) throws java.rmi.RemoteException, JgroupException
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
.conf
- configuration informationport
- port used for RMI communicationscsf
- client-side Socket
factory used to
make connections to the registryssf
- server-side ServerSocket
factory
used to accept connections to the registryjava.rmi.RemoteException
- if the registry could not be exportedJgroupException
- Generic exception raised by Jgroup.DSException
- raised when the distributed system configuration object contains an error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |