org.objectweb.carol.cmi
Class RegistryClient

java.lang.Object
  extended by org.objectweb.carol.cmi.RegistryClient
All Implemented Interfaces:
java.rmi.registry.Registry, java.rmi.Remote

public class RegistryClient
extends java.lang.Object
implements Registry

Author:
Simon Nieuvarts

Field Summary
 
Fields inherited from interface org.objectweb.carol.cmi.Registry
DEFAULT_PORT
 
Fields inherited from interface java.rmi.registry.Registry
REGISTRY_PORT
 
Constructor Summary
RegistryClient(org.objectweb.carol.cmi.RegistryInternal cr)
          Constructor
 
Method Summary
 void bind(java.lang.String name, java.rmi.Remote obj)
          Bind an entry
 java.lang.String[] list()
          Get the entries list
 java.rmi.Remote lookup(java.lang.String name)
          Retrieve an object by a name
 void rebind(java.lang.String name, java.rmi.Remote obj)
          Rebind an entry
 void test()
          Test
 void unbind(java.lang.String name)
          Unbind an entry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryClient

public RegistryClient(org.objectweb.carol.cmi.RegistryInternal cr)
               throws java.rmi.RemoteException
Constructor

Parameters:
cr - client registry
Throws:
java.rmi.RemoteException - if exception
Method Detail

list

public java.lang.String[] list()
                        throws java.rmi.RemoteException
Get the entries list

Specified by:
list in interface java.rmi.registry.Registry
Returns:
entries
Throws:
java.rmi.RemoteException - if Exception is encountered

test

public void test()
          throws java.rmi.RemoteException
Test

Throws:
java.rmi.RemoteException - if Exception is encountered

lookup

public java.rmi.Remote lookup(java.lang.String name)
                       throws java.rmi.NotBoundException,
                              java.rmi.RemoteException
Retrieve an object by a name

Specified by:
lookup in interface java.rmi.registry.Registry
Parameters:
name - name to search
Returns:
object associated
Throws:
java.rmi.NotBoundException - if entry is not found
java.rmi.RemoteException - if an exception is encountered

bind

public void bind(java.lang.String name,
                 java.rmi.Remote obj)
          throws java.rmi.AlreadyBoundException,
                 java.rmi.RemoteException
Bind an entry

Specified by:
bind in interface java.rmi.registry.Registry
Parameters:
name - name
obj - object
Throws:
java.rmi.AlreadyBoundException - if the entry is already bound
java.rmi.RemoteException - if an exception is encountered

rebind

public void rebind(java.lang.String name,
                   java.rmi.Remote obj)
            throws java.rmi.RemoteException
Rebind an entry

Specified by:
rebind in interface java.rmi.registry.Registry
Parameters:
name - name
obj - object
Throws:
java.rmi.RemoteException - if an exception is encountered

unbind

public void unbind(java.lang.String name)
            throws java.rmi.NotBoundException,
                   java.rmi.RemoteException
Unbind an entry

Specified by:
unbind in interface java.rmi.registry.Registry
Parameters:
name - entry to unregister
Throws:
java.rmi.NotBoundException - if entry is not found
java.rmi.RemoteException - if an exception is encountered