xmlBlaster 2.2.0 API

org.xmlBlaster.util.pool
Interface I_PoolManager

All Known Implementing Classes:
DbPool, NamedConnectionPool.UnnamedConnectionPool, TestPoolManager.TestPool

public interface I_PoolManager

Interface you need to implement to receive state transition callbacks from the PoolManager.

This code is derived from the org.jutils.pool package.

Author:
"Marcel Ruff"
See Also:
PoolManager, ResourceWrapper

Method Summary
 void busyToIdle(java.lang.Object resource)
          Is invoked on state transition from 'busy' to 'idle'.
 void idleToBusy(java.lang.Object resource)
          Is invoked on state transition from 'idle' to 'busy'.
 java.lang.Object toCreate(java.lang.String instanceId)
          Is invoked when a new resource is needed.
 void toErased(java.lang.Object resource)
          Is invoked when a resource is destroyed explicitly or by timeout.
 

Method Detail

idleToBusy

void idleToBusy(java.lang.Object resource)
Is invoked on state transition from 'idle' to 'busy'.

You can code here some specific behavior.


busyToIdle

void busyToIdle(java.lang.Object resource)
Is invoked on state transition from 'busy' to 'idle'.

You can code here some specific behavior.


toCreate

java.lang.Object toCreate(java.lang.String instanceId)
                          throws XmlBlasterException
Is invoked when a new resource is needed.

You need to create a new resource instance (e.g. a JDBC connection) and return it.

Returns:
A new Resource which will be managed
Throws:
XmlBlasterException

toErased

void toErased(java.lang.Object resource)
Is invoked when a resource is destroyed explicitly or by timeout.

You may want to do some specific coding here, for example logout from a JDBC connection.


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.