toolbox.oracle.siebel.session
Class ResourcePoolTokenImpl

java.lang.Object
  extended by toolbox.pooling.ResourcePoolImpl
      extended by toolbox.oracle.siebel.session.ResourcePoolTokenImpl
All Implemented Interfaces:
toolbox.pooling.ResourcePool

public class ResourcePoolTokenImpl
extends toolbox.pooling.ResourcePoolImpl

ResourcePool implementation to pool Oracle Siebel stateless session tokens.

Author:
Hannes Holtzhausen

Field Summary
 
Fields inherited from class toolbox.pooling.ResourcePoolImpl
m_customProps
 
Constructor Summary
ResourcePoolTokenImpl()
          Default constructor.
 
Method Summary
protected  java.lang.Object createResource(toolbox.allegato.XMLProperties xmlProps, int count)
          Create and return a session token instance.
protected  void destroyResource(java.lang.Object resource)
          Destroy the given Token.
protected  boolean isResourceValid(java.lang.Object resource)
          Validates the given Token and returns the validation state.
protected  void preInit(toolbox.allegato.XMLProperties xmlProps)
          Initialises the SessionTokenConfig object required by this pool to perform resource creation.
 
Methods inherited from class toolbox.pooling.ResourcePoolImpl
destroy, getName, getResource, getStatus, getStatusString, init, releaseResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcePoolTokenImpl

public ResourcePoolTokenImpl()
Default constructor.

Method Detail

preInit

protected void preInit(toolbox.allegato.XMLProperties xmlProps)
                throws toolbox.pooling.ResourcePoolException
Initialises the SessionTokenConfig object required by this pool to perform resource creation.

Specified by:
preInit in class toolbox.pooling.ResourcePoolImpl
Parameters:
xmlProps - XMLProperties instance.
Throws:
toolbox.pooling.ResourcePoolException - if the configuration cannot be initialised.

createResource

protected java.lang.Object createResource(toolbox.allegato.XMLProperties xmlProps,
                                          int count)
                                   throws toolbox.pooling.ResourcePoolException
Create and return a session token instance.

Specified by:
createResource in class toolbox.pooling.ResourcePoolImpl
Parameters:
xmlProps - XMLProperties instance.
count - int indicating how many times this operation has been invoked.
Returns:
Token instance that was created.
Throws:
toolbox.pooling.ResourcePoolException - if the token cannot be created.

destroyResource

protected void destroyResource(java.lang.Object resource)
Destroy the given Token.

Specified by:
destroyResource in class toolbox.pooling.ResourcePoolImpl
Parameters:
resource - Token resource to destroy.
Throws:
toolbox.pooling.ResourcePoolException

isResourceValid

protected boolean isResourceValid(java.lang.Object resource)
                           throws toolbox.pooling.ResourcePoolException
Validates the given Token and returns the validation state.

Specified by:
isResourceValid in class toolbox.pooling.ResourcePoolImpl
Parameters:
resource - Token instance to validate.
Returns:
boolean indicating the state of the token instance.
Throws:
toolbox.pooling.ResourcePoolException