ibis.rmi
Class Naming

java.lang.Object
  extended by ibis.rmi.Naming

public final class Naming
extends Object

The Naming class provides static methods for storing and obtaining references to remote objects. These methods take a name in URL format as one of its arguments.


Method Summary
static void bind(String name, Remote obj)
          Binds the specified name to the specified remote object.
static String[] list(String name)
          Returns an array of all names bound in the registry.
static Remote lookup(String name)
          Returns a reference for the remote object associated with the specified name.
static void rebind(String name, Remote obj)
          Rebinds the specified name to the specified remote object.
static void unbind(String name)
          Removes the binding for the specified name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lookup

public static Remote lookup(String name)
                     throws NotBoundException,
                            MalformedURLException,
                            RemoteException
Returns a reference for the remote object associated with the specified name.

Parameters:
name - the name in URL format
Returns:
a stub for the remote object
Throws:
NotBoundException - if name is not bound
MalformedURLException - if the name is not appropriately formatted
RemoteException - if the registry could not be found

bind

public static void bind(String name,
                        Remote obj)
                 throws AlreadyBoundException,
                        MalformedURLException,
                        RemoteException
Binds the specified name to the specified remote object.

Parameters:
name - the name in URL format
obj - a reference to the remote object
Throws:
RemoteException - if the registry could not be found
MalformedURLException - if the name is not appropriately formatted
AlreadyBoundException - if the name is already bound

unbind

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

Parameters:
name - the name in URL format
Throws:
NotBoundException - if name is not bound
MalformedURLException - if the name is not appropriately formatted
RemoteException - if the registry could not be found

rebind

public static void rebind(String name,
                          Remote obj)
                   throws RemoteException,
                          MalformedURLException
Rebinds the specified name to the specified remote object. A existing binding is for the name is replaced.

Parameters:
name - the name in URL format
obj - a reference to the remote object
Throws:
RemoteException - if the registry could not be found
MalformedURLException - if the name is not appropriately formatted

list

public static String[] list(String name)
                     throws RemoteException,
                            MalformedURLException
Returns an array of all names bound in the registry.

Parameters:
name - a registry name in URL format.
Returns:
an array of names.
Throws:
MalformedURLException - if the name is not appropriately formatted
RemoteException - if the registry could not be found


The Ibis project