Class java.rmi.registry.RegistryImpl
All Packages Class Hierarchy This Package Previous Next Index
Class java.rmi.registry.RegistryImpl
java.lang.Object
|
+----java.rmi.server.RemoteObject
|
+----java.rmi.server.RemoteServer
|
+----java.rmi.registry.RegistryImpl
- public class RegistryImpl
- extends RemoteServer
- implements Registry
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 registry for different hosts.
- See Also:
- LocateRegistry
-
RegistryImpl()
- Construct a new RegistryImpl on the default port.
-
RegistryImpl(int)
- Construct a new RegistryImpl on the specified port.
-
bind(String, Remote)
- Binds the name to the specified remote object.
-
list()
- Returns an enumeration of the names in the registry.
-
lookup(String)
- Returns the remote object for specified name in the registry.
-
main(String[])
- Main program to start a registry.
-
rebind(String, Remote)
-
Rebind the name to a new object, replaces any existing binding.
-
unbind(String)
- Unbind the name.
RegistryImpl
public RegistryImpl() throws RemoteException
- Construct a new RegistryImpl on the default port.
RegistryImpl
public RegistryImpl(int port) throws RemoteException
- Construct a new RegistryImpl on the specified port.
lookup
public Remote lookup(String name) throws RemoteException, NotBoundException, AccessException
- Returns the remote object for specified name in the registry.
- Throws: RemoteException
- If remote operation failed.
- Throws: NotBound
- If name is not currently bound.
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.
- Throws: AlreadyBoundException
- If name is already bound.
unbind
public void unbind(String name) throws RemoteException, NotBoundException, AccessException
- Unbind the name.
- Throws: RemoteException
- If remote operation failed.
- Throws: NotBound
- If name is not currently bound.
rebind
public void rebind(String name,
Remote obj) throws RemoteException, AccessException
- Rebind the name to a new object, replaces any existing binding.
- Throws: RemoteException
- If remote operation failed.
list
public String[] list() throws RemoteException, AccessException
- Returns an enumeration of the names in the registry.
- Throws: RemoteException
- If remote operation failed.
main
public static void main(String args[])
- Main program to start a registry.
The port number can be specified on the command line.
All Packages Class Hierarchy This Package Previous Next Index