Interface java.rmi.registry.Registry
- public abstract interface Registry
- extends Remote
A "registry" exists on every node that allows RMI connections to
servers on that node. The registry on a particular node contains a
transient database that maps names to remote objects. When the
node boots, the registry database is empty. The names stored in the
registry are pure and are not parsed. A service storing itself in
the registry may want to prefix its name of the service by a package
name (although not required), to reduce name collisions in the
registry.
The LocateRegistry class is used to obtain the registry for different hosts.
- See Also:
LocateRegistry
Field Summary
|
static int
|
REGISTRY_PORT
Well known port for registry |
Method Summary
|
void
|
bind(String name,
Remote obj)
Binds the name to the specified remote object. |
String[]
|
list()
Returns an array of the names in the registry. |
Remote
|
lookup(String name)
Returns the remote object associated with the specified name in the
registry. |
void
|
rebind(String name,
Remote obj)
Rebind the name to a new object, replacing any existing binding. |
void
|
unbind(String name)
Unbind the name. |
REGISTRY_PORT
public static final int REGISTRY_PORT
- Well known port for registry
lookup
public Remote lookup(String name)
throws RemoteException,
NotBoundException,
AccessException
- Returns the remote object associated with the specified name in the
registry.
- Throws:
- RemoteException - If remote operation failed.
- NotBoundException - if there is no object with this name in the
registry.
- AccessException - If this operation is not permitted.
bind
public void bind(String name,
Remote obj)
throws RemoteException,
AlreadyBoundException,
AccessException
- Binds the name to the specified remote object.
- Throws:
- RemoteException - If remote operation failed.
- AlreadyBoundException - If name is already bound.
- AccessException - If this operation is not permitted.
unbind
public void unbind(String name)
throws RemoteException,
NotBoundException,
AccessException
- Unbind the name.
- Throws:
- RemoteException - If remote operation failed.
- NotBoundException - if there is no object with this name in the
registry.
- AccessException - If this operation is not permitted.
rebind
public void rebind(String name,
Remote obj)
throws RemoteException,
AccessException
- Rebind the name to a new object, replacing any existing binding.
- Throws:
- RemoteException - If remote operation failed.
- AccessException - If this operation is not permitted.
list
public String[] list()
throws RemoteException,
AccessException
- Returns an array of the names in the registry.
- Throws:
- RemoteException - If remote operation failed.
- AccessException - If this operation is not permitted.
Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.