org.mule.config.pool
Class CommonsPoolProxyPool

java.lang.Object
  extended byorg.mule.config.pool.CommonsPoolProxyPool
All Implemented Interfaces:
ObjectPool

public class CommonsPoolProxyPool
extends java.lang.Object
implements ObjectPool

CommonsPoolProxyPool is pool used to store MuleProxy objects. This pool is a jakarta commons-pool implementation.

Version:
$Revision: 1.3 $
Author:
Ross Mason

Field Summary
protected static Log logger
          logger used by this class
 
Fields inherited from interface org.mule.util.ObjectPool
DEFAULT_EXHAUSTED_ACTION, DEFAULT_MAX_SIZE, DEFAULT_MAX_WAIT, WHEN_EXHAUSTED_BLOCK, WHEN_EXHAUSTED_FAIL, WHEN_EXHAUSTED_GROW
 
Constructor Summary
CommonsPoolProxyPool(MuleDescriptor descriptor)
          Creates a new pool and an Object factory with the UMODescriptor
CommonsPoolProxyPool(MuleDescriptor descriptor, GenericObjectPool.Config config)
           
 
Method Summary
 java.lang.Object borrowObject()
           
 void clearPool()
           
 int getMaxSize()
           
 int getSize()
           
 void onAdd(java.lang.Object proxy)
           
 void onRemove(java.lang.Object proxy)
           
 void returnObject(java.lang.Object object)
           
 void setFactory(ObjectFactory factory)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static transient Log logger
logger used by this class

Constructor Detail

CommonsPoolProxyPool

public CommonsPoolProxyPool(MuleDescriptor descriptor)
Creates a new pool and an Object factory with the UMODescriptor

Parameters:
descriptor - the descriptor to use when constructing MuleProxy objects in the pool

CommonsPoolProxyPool

public CommonsPoolProxyPool(MuleDescriptor descriptor,
                            GenericObjectPool.Config config)
Parameters:
descriptor - the UMO descriptor to pool
config - the config to use when configuring the pool
Method Detail

borrowObject

public java.lang.Object borrowObject()
                              throws java.lang.Exception
Specified by:
borrowObject in interface ObjectPool
Throws:
java.lang.Exception

returnObject

public void returnObject(java.lang.Object object)
                  throws java.lang.Exception
Specified by:
returnObject in interface ObjectPool
Throws:
java.lang.Exception

getSize

public int getSize()
Specified by:
getSize in interface ObjectPool

getMaxSize

public int getMaxSize()
Specified by:
getMaxSize in interface ObjectPool

setFactory

public void setFactory(ObjectFactory factory)
Specified by:
setFactory in interface ObjectPool

clearPool

public void clearPool()
Specified by:
clearPool in interface ObjectPool

onAdd

public void onAdd(java.lang.Object proxy)
Specified by:
onAdd in interface ObjectPool

onRemove

public void onRemove(java.lang.Object proxy)
Specified by:
onRemove in interface ObjectPool

start

public void start()
           throws UMOException
Specified by:
start in interface ObjectPool
Throws:
UMOException

stop

public void stop()
          throws UMOException
Specified by:
stop in interface ObjectPool
Throws:
UMOException


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.