org.d_haven.mpool
Class PoolAdaptor

java.lang.Object
  extended byorg.d_haven.mpool.PoolAdaptor
All Implemented Interfaces:
PoolListener
Direct Known Subclasses:
RecyclePoolListener

public class PoolAdaptor
extends java.lang.Object
implements PoolListener

Created by IntelliJ IDEA. User: bloritsch Date: Jun 18, 2004 Time: 3:22:55 PM To change this template use File | Settings | File Templates.


Constructor Summary
PoolAdaptor()
           
 
Method Summary
 void objectAquired(java.lang.Object pooledObject)
          Notifies the listener when an object is being accessed from the pool.
 void objectCreated(java.lang.Object pooledObject)
          Notifies the listener when the pool creates a new object to introduce into the pool.
 void objectCreationFailed(java.lang.Exception cause)
          Notifies the listener when the pool fails to create a new object when it is asked for.
 void objectDisposalFailed(java.lang.Object pooledObject, java.lang.Exception exception)
          Notifies the listener when an object could not properly be disposed.
 void objectDisposed(java.lang.Object pooledObject)
          Notifies the listener when an object is being disposed so that it will never be reused.
 void objectReleased(java.lang.Object pooledObject)
          Notifies the listener when an object is being returned to the pool.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PoolAdaptor

public PoolAdaptor()
Method Detail

objectCreated

public void objectCreated(java.lang.Object pooledObject)
Notifies the listener when the pool creates a new object to introduce into the pool.

Specified by:
objectCreated in interface PoolListener
Parameters:
pooledObject - the object created

objectCreationFailed

public void objectCreationFailed(java.lang.Exception cause)
Notifies the listener when the pool fails to create a new object when it is asked for.

Specified by:
objectCreationFailed in interface PoolListener
Parameters:
cause - the exception that caused the failure

objectAquired

public void objectAquired(java.lang.Object pooledObject)
Notifies the listener when an object is being accessed from the pool. This is the last method called before returning the pooled object to the caller.

Specified by:
objectAquired in interface PoolListener
Parameters:
pooledObject - the object being returned from the caller

objectReleased

public void objectReleased(java.lang.Object pooledObject)
Notifies the listener when an object is being returned to the pool. This is the last method called before returning the pooled object to the pool.

Specified by:
objectReleased in interface PoolListener
Parameters:
pooledObject - the object being returned to the pool

objectDisposed

public void objectDisposed(java.lang.Object pooledObject)
Notifies the listener when an object is being disposed so that it will never be reused.

Specified by:
objectDisposed in interface PoolListener
Parameters:
pooledObject - the object being disposed

objectDisposalFailed

public void objectDisposalFailed(java.lang.Object pooledObject,
                                 java.lang.Exception exception)
Notifies the listener when an object could not properly be disposed.

Specified by:
objectDisposalFailed in interface PoolListener
Parameters:
pooledObject - the object that could not be disposed
exception - the exception generated from the disposal

toString

public java.lang.String toString()


Copyright © 2004-2005 D-Haven.org. All Rights Reserved.