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

Constructor Index

 o RegistryImpl()
Construct a new RegistryImpl on the default port.
 o RegistryImpl(int)
Construct a new RegistryImpl on the specified port.

Method Index

 o bind(String, Remote)
Binds the name to the specified remote object.
 o list()
Returns an enumeration of the names in the registry.
 o lookup(String)
Returns the remote object for specified name in the registry.
 o main(String[])
Main program to start a registry.
 o rebind(String, Remote)
Rebind the name to a new object, replaces any existing binding.
 o unbind(String)
Unbind the name.

Constructors

 o RegistryImpl
  public RegistryImpl() throws RemoteException
Construct a new RegistryImpl on the default port.
 o RegistryImpl
  public RegistryImpl(int port) throws RemoteException
Construct a new RegistryImpl on the specified port.

Methods

 o 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.
 o 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.
 o 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.
 o 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.
 o list
  public String[] list() throws RemoteException, AccessException
Returns an enumeration of the names in the registry.
Throws: RemoteException
If remote operation failed.
 o 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