ibis.rmi.registry
Interface Registry

All Superinterfaces:
Remote

public interface Registry
extends Remote

A Registry is a remote interface to a remote-object registry. It provides methods for binding and looking-up remote object references bound to names.


Field Summary
static int REGISTRY_PORT
          Well known port for RMI registry.
 
Method Summary
 void bind(java.lang.String name, Remote obj)
          Binds the specified remote reference to the specified name.
 java.lang.String[] list()
          Returns an array of names bound in this registry.
 Remote lookup(java.lang.String name)
          Returns the remote reference bound to the specified name.
 void rebind(java.lang.String name, Remote obj)
          Rebinds the specified remote reference to the specified name.
 void unbind(java.lang.String name)
          Removes the binding for the specified name.
 

Field Detail

REGISTRY_PORT

public static final int REGISTRY_PORT
Well known port for RMI registry.

See Also:
Constant Field Values
Method Detail

lookup

public Remote lookup(java.lang.String name)
              throws RemoteException,
                     NotBoundException
Returns the remote reference bound to the specified name.

Parameters:
name - the name to look up
Returns:
a reference to the remote object
Throws:
NotBoundException - if the name is not bound
RemoteException - if communication with the registry failed.

bind

public void bind(java.lang.String name,
                 Remote obj)
          throws RemoteException,
                 AlreadyBoundException
Binds the specified remote reference to the specified name.

Parameters:
name - the name to bind the reference to
obj - the remote reference
Throws:
AlreadyBoundException - is the name is already bound
RemoteException - if communication with the registry failed.

unbind

public void unbind(java.lang.String name)
            throws RemoteException,
                   NotBoundException
Removes the binding for the specified name.

Parameters:
name - the name to unbind
Throws:
NotBoundException - if the name is not bound
RemoteException - if communication with the registry failed.

rebind

public void rebind(java.lang.String name,
                   Remote obj)
            throws RemoteException
Rebinds the specified remote reference to the specified name. Any existing binding for the name is replaced.

Parameters:
name - the name to bind the reference to
obj - the remote reference
Throws:
RemoteException - if communication with the registry failed.

list

public java.lang.String[] list()
                        throws RemoteException
Returns an array of names bound in this registry.

Returns:
an array of names
Throws:
RemoteException - if communication with the registry failed.


The Ibis project