org.jboss.dtf.testframework.utils
Class DistributedIORStore

java.lang.Object
  extended by org.jboss.dtf.testframework.utils.DistributedIORStore
All Implemented Interfaces:
IORStore

public class DistributedIORStore
extends java.lang.Object
implements IORStore


Constructor Summary
DistributedIORStore()
           
 
Method Summary
 void initialiseStore(java.lang.String URI)
          Initialises the IOR store.
 java.lang.String loadIOR(java.lang.String serverName)
          Finds the IOR stored in the name service against the given name.
 void removeIOR(java.lang.String serverName)
          Removes the object's IOR from the name service whos name matches serverName.
 void storeIOR(java.lang.String serverName, java.lang.String serverIOR)
          Stores an object's IOR against a given unique name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributedIORStore

public DistributedIORStore()
Method Detail

initialiseStore

public void initialiseStore(java.lang.String URI)
Initialises the IOR store. This informs the IOR store of the NameService it is to use to store and retrieve names from.

Specified by:
initialiseStore in interface IORStore
Parameters:
URI - The URI of the NameService e.g. //bob/NameService

storeIOR

public void storeIOR(java.lang.String serverName,
                     java.lang.String serverIOR)
              throws java.lang.Exception
Stores an object's IOR against a given unique name. This method simply calls NameService.rebindReference.

Specified by:
storeIOR in interface IORStore
Parameters:
serverName - The unique name for this IOR (e.g. \TestGroupA\TestA\ServerA),
serverIOR - The IOR for this object reference.
Throws:
java.lang.Exception

removeIOR

public void removeIOR(java.lang.String serverName)
               throws java.lang.Exception
Removes the object's IOR from the name service whos name matches serverName.

Specified by:
removeIOR in interface IORStore
Parameters:
serverName - The name in the NameService to be removed.
Throws:
java.lang.Exception

loadIOR

public java.lang.String loadIOR(java.lang.String serverName)
                         throws java.lang.Exception
Finds the IOR stored in the name service against the given name.

Specified by:
loadIOR in interface IORStore
Parameters:
serverName - The name of the IOR to be found in the NameService.
Throws:
java.lang.Exception