ermi
Class Naming

java.lang.Object
  |
  +--ermi.Naming

public class Naming
extends java.lang.Object

The Naming class provides methods for storing and obtaining references to remote objects in the remote object registry.

The ermi.Naming API (unlike java.RMI) does not use URLs, but Properties Object or files containing connection parameters. It is then mandatory to call loadRegistry before using the functionality of the Registry..


Constructor Summary
Naming()
           
 
Method Summary
static void bind(java.lang.String name, ermi.ERemote ref)
          Binds the specified name to a remote object.
static java.util.Vector list()
          Returns a Vector of the names bound in the registry.
static void loadRegistry(java.lang.String ref)
          It connects to the Registry using the information contained in the properties file ref).
static ermi.ERemote lookup(java.lang.String name)
          Returns a reference, a stub, for the remote object associated with the specified name.
static void rebind(java.lang.String name, ermi.ERemote ref)
          Rebinds the specified name in the registry.
static void unbind(java.lang.String name)
          Unbinds the specified name from the registry.
static void unloadRegistry()
          Disconnects from to the Registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Naming

public Naming()
Method Detail

loadRegistry

public static void loadRegistry(java.lang.String ref)
                         throws RemoteException
It connects to the Registry using the information contained in the properties file ref).

Parameters:
ref - Name of properties file containing connection parameters.
Throws:
RemoteException - - if the connection with the event service fails.

unloadRegistry

public static void unloadRegistry()
                           throws RemoteException
Disconnects from to the Registry.

Throws:
RemoteException - - if the connection with the event service fails.

lookup

public static ermi.ERemote lookup(java.lang.String name)
                           throws RemoteException
Returns a reference, a stub, for the remote object associated with the specified name.

Returns:
ermi.Eremote Reference to the remote object
Throws:
RemoteException - - if the connection with the event service fails.
NotBoundException - - if the Registry does not contains this Id.

bind

public static void bind(java.lang.String name,
                        ermi.ERemote ref)
                 throws RemoteException
Binds the specified name to a remote object.

Parameters:
name - Id of the remote object
ref - remote object reference to bind
Throws:
RemoteException - - if the connection with the event service fails.

unbind

public static void unbind(java.lang.String name)
                   throws RemoteException
Unbinds the specified name from the registry.

Parameters:
name - Id of the remote object
Throws:
NotBoundException - - if the Registry does not contains this Id.
RemoteException - - if the connection with the event service fails.

rebind

public static void rebind(java.lang.String name,
                          ermi.ERemote ref)
                   throws RemoteException
Rebinds the specified name in the registry.

Parameters:
name - Id of the remote object
ref - remote object reference to bind
Throws:
RemoteException - - if the connection with the event service fails.

list

public static java.util.Vector list()
                             throws RemoteException
Returns a Vector of the names bound in the registry. The Vector contains a snapshot of the names present in the registry at the time of the call.

Returns:
java.util.Vector A list of Ids from remote objects.
Throws:
RemoteException - - if the connection with the event service fails.