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

Constructor Index

 o Registrar()
Create a Registrar for the UniVMRegistry on current host using the default rmi registry port.
 o Registrar(int)
Create a Registrar for the UniVMRegistry on current host using the given port.
 o Registrar(String)
Create a Registrar for the UniVMRegistry on given host using the default rmi registry port.
 o Registrar(String, int)
Create a Registrar for the UniVMRegistry on given host using the given port.

Method Index

 o bind(String, Remote)
Binds the name to the specified remote object.
 o list()
Returns an array of the names in the registry.
 o lookup(String)
Returns the remote object associated with the specified name in the registry.
 o rebind(String, Remote)
Rebind the name to a new object, replacing any existing binding.
 o rebind(String, String)
Rebind the name to a new object, created from the class indicated by className, replacing any existing binding.
 o unbind(String)
Unbind the name.
 o verboseRebind(int, String, String)
Binds the name to the specified remote object on locat registry on given port.

Constructors

 o Registrar
 public Registrar() throws RemoteException
Create a Registrar for the UniVMRegistry on current host using the default rmi registry port.

 o Registrar
 public Registrar(int port) throws RemoteException
Create a Registrar for the UniVMRegistry on current host using the given port.

 o Registrar
 public Registrar(String host) throws RemoteException
Create a Registrar for the UniVMRegistry on given host using the default rmi registry port.

 o Registrar
 public Registrar(String host,
                  int port) throws RemoteException
Create a Registrar for the UniVMRegistry on given host using the given port.

Methods

 o list
 public String[] list() throws RemoteException
Returns an array of the names in the registry.

Throws: RemoteException
If remote operation failed.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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