nf.fr.eraasoft.pool
Interface PoolableObject<T>

All Known Implementing Classes:
PoolableObjectBase

public interface PoolableObject<T>


Method Summary
 void activate(T t)
          is invoked on every instance that has been passivated before it is borrowed from the pool.
 void destroy(T t)
          is invoked on every instance when it is being "dropped" from the pool (whether due to the response from validateObject, or for reasons specific to the pool implementation.)
 T make()
          is called whenever a new instance is needed.
 void passivate(T t)
          is invoked on every instance when it is returned to the pool.
 boolean validate(T t)
          is invoked on activated instances to make sure they can be borrowed from the pool. validateObject may also be used to test an instance being returned to the pool before it is passivated.
 

Method Detail

make

T make()
       throws PoolException
is called whenever a new instance is needed.

Returns:
Throws:
PoolException

validate

boolean validate(T t)
is invoked on activated instances to make sure they can be borrowed from the pool. validateObject may also be used to test an instance being returned to the pool before it is passivated. It will only be invoked on an activated instance.

Parameters:
t -
Returns:

destroy

void destroy(T t)
is invoked on every instance when it is being "dropped" from the pool (whether due to the response from validateObject, or for reasons specific to the pool implementation.) There is no guarantee that the instance being destroyed will be considered active, passive or in a generally consistent state.

Parameters:
t -

activate

void activate(T t)
              throws PoolException
is invoked on every instance that has been passivated before it is borrowed from the pool.

Parameters:
t -
Throws:
PoolException

passivate

void passivate(T t)
is invoked on every instance when it is returned to the pool.

Parameters:
t -


Copyright © 2013. All Rights Reserved.