org.mule.config.pool
Class CommonsPoolProxyPool

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

public class CommonsPoolProxyPool
extends Object
implements ObjectPool

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


Field Summary
protected  ObjectFactory factory
          the factory used to create objects for the pool
protected static Log logger
          logger used by this class
protected  GenericObjectPool pool
          The pool that holds the MuleProxy objects
 
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, ObjectFactory factory)
          Creates a new pool and an Object factory with the UMODescriptor
 
Method Summary
 Object borrowObject()
           
 void clearPool()
           
 int getMaxSize()
           
 int getSize()
           
 void onAdd(Object proxy)
           
 void onRemove(Object proxy)
           
 void returnObject(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 final Log logger
logger used by this class


pool

protected GenericObjectPool pool
The pool that holds the MuleProxy objects


factory

protected ObjectFactory factory
the factory used to create objects for the pool

Constructor Detail

CommonsPoolProxyPool

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

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

borrowObject

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

returnObject

public void returnObject(Object object)
                  throws Exception
Specified by:
returnObject in interface ObjectPool
Throws:
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(Object proxy)
Specified by:
onAdd in interface ObjectPool

onRemove

public void onRemove(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-2006 MuleSource Inc.. All Rights Reserved.