All Packages Class Hierarchy This Package Previous Next Index
Class sdsu.rmi.registry.Registrar
java.lang.Object
|
+----sdsu.rmi.registry.Registrar
- public class Registrar
- extends Object
- implements Registry
Registrar is a client that can be used to register
remote objects with a UniVMRegistry. Create a
Registrar with host and port of the machine that
is running the UniVMRegistry. You can bind objects to
a UniVMRegistry on a remote host. Object bound to the
UniVMRegistry are run in the VM running the UniVMRegistry,
not the VM running the Registrar.
- Version:
- 0.9 21 January 1998
- Author:
- Roger Whitney
(whitney@cs.sdsu.edu)
- See Also:
- UniVMRegistry
-
Registrar()
- Create a Registrar for the UniVMRegistry on current host
using the default rmi registry port.
-
Registrar(int)
- Create a Registrar for the UniVMRegistry on current host
using the given port.
-
Registrar(String)
- Create a Registrar for the UniVMRegistry on given host
using the default rmi registry port.
-
Registrar(String, int)
- Create a Registrar for the UniVMRegistry on given host
using the given port.
-
bind(String, Remote)
- Binds the name to the specified remote object.
-
list()
- Returns an array of the names in the registry.
-
lookup(String)
- Returns the remote object associated with the specified name in the
registry.
-
rebind(String, Remote)
-
Rebind the name to a new object, replacing any existing binding.
-
rebind(String, String)
-
Rebind the name to a new object, created from the
class indicated by className, replacing any existing binding.
-
unbind(String)
- Unbind the name.
-
verboseRebind(int, String, String)
- Binds the name to the specified remote object on
locat registry on given port.
Registrar
public Registrar() throws RemoteException
- Create a Registrar for the UniVMRegistry on current host
using the default rmi registry port.
Registrar
public Registrar(int port) throws RemoteException
- Create a Registrar for the UniVMRegistry on current host
using the given port.
Registrar
public Registrar(String host) throws RemoteException
- Create a Registrar for the UniVMRegistry on given host
using the default rmi registry port.
Registrar
public Registrar(String host,
int port) throws RemoteException
- Create a Registrar for the UniVMRegistry on given host
using the given port.
list
public String[] list() throws RemoteException
- Returns an array of the names in the registry.
- Throws: RemoteException
- If remote operation failed.
rebind
public void rebind(String name,
String className) throws RemoteException
- Rebind the name to a new object, created from the
class indicated by className, replacing any existing binding.
The remote registry's classpath must include the className.
- Parameters:
- className - Full class name, used to create remote object.
Class must implement java.rmi.Remote
- Throws: RemoteException
- If remote operation failed.
- Throws: AccessException
- If this operation is not permitted.
rebind
public void rebind(String name,
Remote object) throws RemoteException
- Rebind the name to a new object, replacing any existing binding.
- Throws: RemoteException
- If remote operation failed.
- Throws: AccessException
- If this operation is not permitted.
bind
public void bind(String name,
Remote object) throws RemoteException, AlreadyBoundException
- Binds the name to the specified remote object.
- Throws: RemoteException
- If remote operation failed.
- Throws: AlreadyBoundException
- If name is already bound.
unbind
public void unbind(String name) throws RemoteException, NotBoundException, AccessException
- Unbind the name.
- Throws: RemoteException
- If remote operation failed.
- Throws: NotBoundException
- if there is no object with this name in the
registry.
- Throws: AccessException
- If this operation is not permitted.
lookup
public Remote lookup(String name) throws RemoteException, NotBoundException, AccessException
- Returns the remote object associated with the specified name in the
registry.
- Throws: RemoteException
- If remote operation failed.
- Throws: NotBoundException
- if there is no object with this name in the
registry.
- Throws: AccessException
- If this operation is not permitted.
verboseRebind
public static String verboseRebind(int port,
String name,
String className) throws RemoteException
- Binds the name to the specified remote object on
locat registry on given port.
Returns a list names which objects are bound to in
the registry.
- Throws: RemoteException
- If remote operation failed.
All Packages Class Hierarchy This Package Previous Next Index