org.jboss.dtf.testframework.nameservice
Class NameService
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
org.jboss.dtf.testframework.nameservice.NameService
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, NameServiceInterface
public class NameService
- extends java.rmi.server.UnicastRemoteObject
- implements NameServiceInterface
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Method Summary |
void |
bindReference(java.lang.String name,
java.lang.Object obj)
Binds a string name to an object reference. |
static void |
initialiseRegistry()
|
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 |
static void |
main(java.lang.String[] args)
|
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. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
NameService
public NameService()
throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
rebindReference
public void rebindReference(java.lang.String name,
java.lang.Object obj)
throws java.rmi.RemoteException
- Description copied from interface:
NameServiceInterface
- Binds a string name to an object reference. If the name is already bound then its
binding is altered.
- Specified by:
rebindReference
in interface NameServiceInterface
- Parameters:
name
- The string name to bind the object to.obj
- The object reference to bind.
- Throws:
java.rmi.RemoteException
bindReference
public void bindReference(java.lang.String name,
java.lang.Object obj)
throws java.rmi.RemoteException,
NameAlreadyBound
- Description copied from interface:
NameServiceInterface
- Binds a string name to an object reference. If the name is already bound then an
exception will be thrown.
- Specified by:
bindReference
in interface NameServiceInterface
- 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
unbindReference
public void unbindReference(java.lang.String name)
throws java.rmi.RemoteException,
NameNotBound
- Description copied from interface:
NameServiceInterface
- Unbinds a string name from an object reference.
- Specified by:
unbindReference
in interface NameServiceInterface
- Parameters:
name
- The string name to unbind.
- Throws:
NameNotBound
- Thrown if the name is not
bound to an object reference.
java.rmi.RemoteException
lookup
public java.lang.Object lookup(java.lang.String name)
throws java.rmi.RemoteException,
NameNotBound
- Description copied from interface:
NameServiceInterface
- Looks for the object reference which bound to the given name
- Specified by:
lookup
in interface NameServiceInterface
- 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
public java.lang.String[] lookupNames(java.lang.String directory)
throws java.rmi.RemoteException,
NameNotBound
- Description copied from interface:
NameServiceInterface
- Retrieves a list of object reference which are bound in the given directory
- Specified by:
lookupNames
in interface NameServiceInterface
- Parameters:
directory
- The directory to look within
- Throws:
java.rmi.RemoteException
NameNotBound
initialiseRegistry
public static void initialiseRegistry()
main
public static void main(java.lang.String[] args)