| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.springframework.aop.target.AbstractPrototypeTargetSource | +--org.springframework.aop.target.AbstractPoolingTargetSource
Abstract uperclass for pooling TargetSources that maintains a pool of target instances, acquiring and releasing a target object from the pool for each method invocation. This class is independent of pooling technology.
Subclasses must implement the getTarget() and releaseTarget() methods to work with their chosen pool. The newPrototypeInstance() method inherited from AbstractPrototypeTargetSource can be used to create objects to put in the pool. Subclasses must also implement some of the monitoring methods from the PoolingConfig interface. This class provides the getPoolingConfigMixin() method to return an IntroductionAdvisor making these stats available on proxied objects.
This class implements DisposableBean to force subclasses to implement a destroy() method to close down their pool.
| Method Summary | |
int | getMaxSize()Return the maximum size of the pool. |
DefaultInterceptionIntroductionAdvisor | getPoolingConfigMixin() |
abstract Object | getTarget()Acquire an object from the pool. |
abstract void | releaseTarget(Object target)Return the given object to the pool. |
final void | setBeanFactory(BeanFactory beanFactory) |
void | setMaxSize(int maxSize)Set the maximum size of the pool. |
| Methods inherited from class org.springframework.aop.target.AbstractPrototypeTargetSource |
afterPropertiesSet, getTargetBeanName, getTargetClass, isStatic, setTargetBeanName |
| Method Detail |
public int getMaxSize()
public DefaultInterceptionIntroductionAdvisor getPoolingConfigMixin()
public abstract Object getTarget()
throws java.lang.Exception
public abstract void releaseTarget(Object target)
throws java.lang.Exception
public final void setBeanFactory(BeanFactory beanFactory)
throws org.springframework.beans.BeansException
public void setMaxSize(int maxSize)
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||