toolbox.oracle.siebel.session
Class SessionTokenManagerDefaultImpl

java.lang.Object
  extended by toolbox.oracle.siebel.session.SessionTokenManagerDefaultImpl
All Implemented Interfaces:
SessionTokenManager

public class SessionTokenManagerDefaultImpl
extends java.lang.Object
implements SessionTokenManager

Default implementation of the SessionTokenManager interface.

This implementation maintains a Map of ResourcePoolTokenImpl instances.

Author:
Hannes Holtzhausen

Constructor Summary
SessionTokenManagerDefaultImpl()
          Default constructor.
 
Method Summary
 void destroy()
          Destroy this manager instance.
 java.lang.String getPoolStatus(java.lang.String poolName)
          Return the status of the named token pool.
 Token getSessionToken(java.lang.String poolName)
          Return a Token instance from the named token pool.
 void init(java.lang.String name, toolbox.allegato.XMLProperties xmlProps)
          Initialise this manager with the given name and XML configuration properties.
 void releaseSessionToken(java.lang.String poolName, Token leasedToken, Token reissuedToken)
          Place the leased token back into the named pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionTokenManagerDefaultImpl

public SessionTokenManagerDefaultImpl()
Default constructor.

Method Detail

init

public void init(java.lang.String name,
                 toolbox.allegato.XMLProperties xmlProps)
          throws SessionTokenManagerException
Initialise this manager with the given name and XML configuration properties.

Specified by:
init in interface SessionTokenManager
Parameters:
name - String containing the name of this manager instance.
xmlProps - XMLProperties instance containing the configuration properties.
Throws:
SessionTokenManagerException - if the manager cannot be initialised.

getSessionToken

public Token getSessionToken(java.lang.String poolName)
                      throws SessionTokenManagerException
Return a Token instance from the named token pool.

Specified by:
getSessionToken in interface SessionTokenManager
Parameters:
poolName - String containing the name of the resource pool that must be used to obtain the token.
Throws:
SessionTokenManagerException - if the manager cannot return a token.

releaseSessionToken

public void releaseSessionToken(java.lang.String poolName,
                                Token leasedToken,
                                Token reissuedToken)
                         throws SessionTokenManagerException
Place the leased token back into the named pool. Optionally replace the value of the token with the provided reissued token.

Specified by:
releaseSessionToken in interface SessionTokenManager
Parameters:
poolName - String containing the name of the pool to return the token to.
leasedToken - The token that must be returned to the named pool.
reissuedToken - Token containing a reissued value.
Throws:
SessionTokenManagerException - if the manager cannot find the a named pool.

getPoolStatus

public java.lang.String getPoolStatus(java.lang.String poolName)
Return the status of the named token pool.

Specified by:
getPoolStatus in interface SessionTokenManager
Parameters:
poolName - String containing the name of the pool.
Returns:
String containing the status of the named pool.

destroy

public void destroy()
Destroy this manager instance.

Specified by:
destroy in interface SessionTokenManager