|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjgroup.core.registry.BootstrapRegistry
public class BootstrapRegistry
Provides static methods for binding bootstrap references to a local RMI registry. It will create local registry if no such registry exists and bind the given name-remote object pair. Currently, used by ExecDaemon, RegistryImpl (DependableRegistry), the Jgroup Daemon and the partition simulator to bootstraping their references.
Constructor Summary | |
---|---|
BootstrapRegistry()
|
Method Summary | |
---|---|
static void |
bind(java.lang.String name,
java.rmi.Remote obj)
Binds the specified name to a new remote object. |
static java.rmi.registry.Registry |
createRegistry()
Create a local RMI registry on the default bootstrap port and socket factories. |
static java.rmi.registry.Registry |
createRegistry(java.rmi.server.RMIClientSocketFactory csf,
java.rmi.server.RMIServerSocketFactory ssf)
Create a local RMI registry on the specified bootstrap port and socket factories. |
static java.rmi.registry.Registry |
getLocalRegistry(java.rmi.server.RMIClientSocketFactory csf,
java.rmi.server.RMIServerSocketFactory ssf)
Get a reference to a local RMI registry associated with the bootstrap port specified in the configuration files. |
static java.rmi.registry.Registry |
getRegistry()
Get a reference to a local RMI registry associated with the bootstrap port specified in the configuration files. |
static java.rmi.registry.Registry |
getRemoteRegistry(java.lang.String hostname,
java.rmi.server.RMIClientSocketFactory csf,
boolean checkCache)
Get a reference to a local RMI registry associated with the specified bootstrap port and socket factories. |
static java.lang.String[] |
list()
Returns an array of the names bound in the bootstrap registry. |
static java.rmi.Remote |
lookup(java.lang.String name)
Obtains a remote object reference for the specified object name, from the local bootstrap registry. |
static java.rmi.Remote |
lookup(java.lang.String hostname,
java.lang.String name)
Obtains a remote object reference for the specified object name, from the bootstrap registry located on the given hostname. |
static void |
rebind(java.lang.String name,
java.rmi.Remote obj)
Rebinds the specified name to a new remote object. |
static void |
refreshRegistryStub()
Update the bootstrap registry reference. |
static void |
refreshRemoteRegistries()
Update the bootstrap registry references to the remote registries. |
static void |
unbind(java.lang.String name)
Removes the binding for the specified name in the bootstrap registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BootstrapRegistry()
Method Detail |
---|
public static void refreshRegistryStub() throws java.rmi.RemoteException
java.rmi.RemoteException
public static void refreshRemoteRegistries() throws java.rmi.RemoteException
java.rmi.RemoteException
public static java.lang.String[] list() throws java.rmi.AccessException, java.rmi.RemoteException
java.rmi.AccessException
- if this operation is not permitted (if originating from a
non-local host, for example)
java.rmi.RemoteException
- if registry could not be contactedpublic static java.rmi.Remote lookup(java.lang.String name) throws java.rmi.AccessException, java.rmi.RemoteException, java.rmi.NotBoundException
name
- Name of remote object to be retreived.
java.rmi.AccessException
- if this operation is not permitted (if originating from a
non-local host, for example)
java.rmi.RemoteException
- if registry could not be contacted
java.rmi.NotBoundException
- if name is not bound in the registrypublic static java.rmi.Remote lookup(java.lang.String hostname, java.lang.String name) throws java.rmi.AccessException, java.net.UnknownHostException, java.rmi.RemoteException, java.rmi.NotBoundException
hostname
- name of remote host from which the object reference is obtainedname
- name of remote object to be retreived
java.rmi.AccessException
- if this operation is not permitted (if originating from a
non-local host, for example)
java.rmi.RemoteException
- if registry could not be contacted
java.rmi.NotBoundException
- if name is not bound in the registry
java.net.UnknownHostException
public static void bind(java.lang.String name, java.rmi.Remote obj) throws java.rmi.AccessException, java.rmi.RemoteException, java.rmi.AlreadyBoundException
name
- Name to be associated with the remote objectobj
- Remote object to associate with the name
java.rmi.AccessException
- if this operation is not permitted (if originating from a
non-local host, for example)
java.rmi.RemoteException
- if registry could not be contacted
java.rmi.AlreadyBoundException
- if name is already boundpublic static void rebind(java.lang.String name, java.rmi.Remote obj) throws java.rmi.AccessException, java.rmi.RemoteException
name
- name to be associated with the remote objectobj
- new remote object to associate with the name
java.rmi.AccessException
- if this operation is not permitted (if originating from a
non-local host, for example)
java.rmi.RemoteException
- if registry could not be contactedpublic static void unbind(java.lang.String name) throws java.rmi.AccessException, java.rmi.RemoteException, java.rmi.NotBoundException
name
- The name of the binding to remove
java.rmi.AccessException
- if this operation is not permitted (if originating from a
non-local host, for example)
java.rmi.RemoteException
- if registry could not be contacted
java.rmi.NotBoundException
- if name is not bound in the registrypublic static java.rmi.registry.Registry getRegistry() throws java.rmi.RemoteException
Registry
object
java.rmi.AccessException
- if this operation is not permitted (if originating from a
non-local host, for example)
java.rmi.RemoteException
- if registry could not be contactedpublic static java.rmi.registry.Registry getLocalRegistry(java.rmi.server.RMIClientSocketFactory csf, java.rmi.server.RMIServerSocketFactory ssf) throws java.rmi.AccessException, java.rmi.RemoteException
csf
- client-side Socket
factory used to make
connections to the registryssf
- server-side ServerSocket
factory used to accept
connections to the registry
Registry
object
java.rmi.AccessException
- if this operation is not permitted (if originating from a
non-local host, for example)
java.rmi.RemoteException
- if registry could not be contactedpublic static java.rmi.registry.Registry getRemoteRegistry(java.lang.String hostname, java.rmi.server.RMIClientSocketFactory csf, boolean checkCache) throws java.net.UnknownHostException, java.rmi.RemoteException
hostname
- the hostname to query for bootstrap registrycsf
- client-side Socket
factory used to make
connections to the registrycheckCache
- use true to check the cache for the registry reference; false will
not query the cache, but will update it.
Registry
object
java.rmi.AccessException
- if this operation is not permitted (if originating from a
non-local host, for example)
java.rmi.RemoteException
- if registry could not be contacted
java.net.UnknownHostException
public static java.rmi.registry.Registry createRegistry() throws java.rmi.AccessException, java.rmi.RemoteException
Registry
object
java.rmi.AccessException
- if this operation is not permitted (if originating from a
non-local host, for example)
java.rmi.RemoteException
- if registry could not be contactedpublic static java.rmi.registry.Registry createRegistry(java.rmi.server.RMIClientSocketFactory csf, java.rmi.server.RMIServerSocketFactory ssf) throws java.rmi.AccessException, java.rmi.RemoteException
csf
- client-side Socket
factory used to make
connections to the registryssf
- server-side ServerSocket
factory used to accept
connections to the registry
Registry
object
java.rmi.AccessException
- if this operation is not permitted (if originating from a
non-local host, for example)
java.rmi.RemoteException
- if registry could not be contacted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |