com.ibm.wsspi.sibx.context
Interface ContextStore


public interface ContextStore

A Context Store provides methods to store and retrieve Context objects.

The Context objects themselves indicate whether they need to be persisted, and if so, provide methods to extract and restore their state.


Field Summary
static java.lang.String $sccsid
           
static java.lang.String COPYRIGHT
           
 
Method Summary
 Context get(java.lang.String key)
          Return the context object with the given key.
 void initialize(java.lang.String moduleName, java.lang.String cellName)
          Intialize the Context Store.
 void put(java.lang.String key, long timeOut, Context context)
          Put the context object into the store with the given key.
 Context remove(java.lang.String key)
          Remove the context object with the given key from the store.
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

$sccsid

public static final java.lang.String $sccsid
See Also:
Constant Field Values
Method Detail

initialize

public void initialize(java.lang.String moduleName,
                       java.lang.String cellName)
                throws StoreException
Intialize the Context Store.

Parameters:
moduleName - The name of the module.
cellName - The name of the cell.
Throws:
StoreException - An error occurred accessing the persistent store.

remove

public Context remove(java.lang.String key)
               throws KeyNotFoundException,
                      StoreException
Remove the context object with the given key from the store.

Parameters:
key - The context key.
Returns:
The context object that was associated with the given key.
Throws:
KeyNotFoundException - The key was not found in the store.
StoreException - An error occurred accessing the persistent store.

get

public Context get(java.lang.String key)
            throws KeyNotFoundException,
                   StoreException
Return the context object with the given key.

Parameters:
key - The context key.
Returns:
The context object that is associated with the given key.
Throws:
KeyNotFoundException - The key was not found in the store.
StoreException - An error occurred accessing the persistent store.

put

public void put(java.lang.String key,
                long timeOut,
                Context context)
         throws DuplicateKeyException,
                StoreException
Put the context object into the store with the given key.

The timeout is only used if the context object is persistent.

Parameters:
key - The key for the context object.
timeOut - The time (in milliseconds) that the context object is valid.
context - The context object.
Throws:
DuplicateKeyException - The key was already in the store.
StoreException - An error occurred accessing the persistent store.