org.jboss.dtf.testframework.nameservice
Interface NameServiceInterface

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
NameService

public interface NameServiceInterface
extends java.rmi.Remote

The interface for a simple NameService.


Method Summary
 void bindReference(java.lang.String name, java.lang.Object obj)
          Binds a string name to an object reference.
 java.lang.Object lookup(java.lang.String name)
          Looks for the object reference which bound to the given name
 java.lang.String[] lookupNames(java.lang.String directory)
          Retrieves a list of object reference which are bound in the given directory
 void rebindReference(java.lang.String name, java.lang.Object obj)
          Binds a string name to an object reference.
 void unbindReference(java.lang.String name)
          Unbinds a string name from an object reference.
 

Method Detail

bindReference

void bindReference(java.lang.String name,
                   java.lang.Object obj)
                   throws java.rmi.RemoteException,
                          NameAlreadyBound
Binds a string name to an object reference. If the name is already bound then an exception will be thrown.

Parameters:
name - The string name to bind the object to.
obj - The object reference to bind.
Throws:
NameAlreadyBound - Thrown if the name is already bound to an object reference
java.rmi.RemoteException

rebindReference

void rebindReference(java.lang.String name,
                     java.lang.Object obj)
                     throws java.rmi.RemoteException
Binds a string name to an object reference. If the name is already bound then its binding is altered.

Parameters:
name - The string name to bind the object to.
obj - The object reference to bind.
Throws:
java.rmi.RemoteException

unbindReference

void unbindReference(java.lang.String name)
                     throws java.rmi.RemoteException,
                            NameNotBound
Unbinds a string name from an object reference.

Parameters:
name - The string name to unbind.
Throws:
NameNotBound - Thrown if the name is not bound to an object reference.
java.rmi.RemoteException

lookup

java.lang.Object lookup(java.lang.String name)
                        throws java.rmi.RemoteException,
                               NameNotBound
Looks for the object reference which bound to the given name

Parameters:
name - The string name to look up.
Throws:
NameNotBound - Thrown if the name is not bound to an object reference.
java.rmi.RemoteException

lookupNames

java.lang.String[] lookupNames(java.lang.String directory)
                               throws java.rmi.RemoteException,
                                      NameNotBound
Retrieves a list of object reference which are bound in the given directory

Parameters:
directory - The directory to look within
Throws:
java.rmi.RemoteException
NameNotBound