org.objectweb.jeremie.services.registry
Class Naming
public final class Naming
Provides a URL-based addressing interface for applications to access a Jeremie
registry and perform registry operations. The registry may be on a distant
machine.
Methods of this class take a URL-formatted string argument of the form:
jrmi://host:port/file
where the scheme "jrmi:" and the "host:port" part can be empty. The host and
port indicate the machine where the Jeremie registry is running; if empty,
it is taken to be the local machine using the default port. The file part of
the URL indicates the name of an object reference to be stored in or
retrieved from the registry.
The implementation of this class uses the interface provided by LocateRegistry
to obtain a local bootstrap stub of the registry.
java.rmi.registry.Registry
, org.objectweb.jeremie.services.registry.lib.LocateRegistry
static void | bind(String fullName, Remote obj) - Accesses a Jeremie registry and binds a remote object reference.
|
static String[] | list(String fullName) - Accesses a Jeremie registry and lists all the names bound in the registry.
|
static Remote | lookup(String fullName) - Accesses a Jeremie registry and retrieves a remote object reference.
|
static void | rebind(String fullName, Remote obj) - Accesses a Jeremie registry and binds a remote object reference.
|
static void | unbind(String fullName) - Accesses a Jeremie registry and unbinds a remote object reference.
|
bind
public static void bind(String fullName,
Remote obj)
throws MalformedURLException,
AlreadyBoundException,
RemoteException
Accesses a Jeremie registry and binds a remote object reference.
fullName
- the location of the registry and the name of the object
reference to be bound.
list
public static String[] list(String fullName)
throws MalformedURLException,
RemoteException
Accesses a Jeremie registry and lists all the names bound in the registry.
fullName
- the location of the registry
- an array of all the names (strings) bound in the registry
lookup
public static Remote lookup(String fullName)
throws MalformedURLException,
NotBoundException,
RemoteException
Accesses a Jeremie registry and retrieves a remote object reference.
fullName
- the location of the registry and the name of the object
reference to be retrieved.
- the designated object reference
rebind
public static void rebind(String fullName,
Remote obj)
throws MalformedURLException,
RemoteException
Accesses a Jeremie registry and binds a remote object reference.
Overrides any existing binding of the designated name.
fullName
- the location of the registry and the name of the object
reference to be bound.
unbind
public static void unbind(String fullName)
throws MalformedURLException,
NotBoundException,
RemoteException
Accesses a Jeremie registry and unbinds a remote object reference.
fullName
- the location of the registry and the name of the object
reference to be unbound.