org.springframework.aop.target
public class: PrototypeTargetSource [javadoc |
source]
java.lang.Object
org.springframework.aop.target.AbstractBeanFactoryBasedTargetSource
org.springframework.aop.target.AbstractPrototypeBasedTargetSource
org.springframework.aop.target.PrototypeTargetSource
All Implemented Interfaces:
TargetSource, BeanFactoryAware, Serializable
TargetSource that creates a new instance of the target bean for each
request, destroying each instance on release (after each request).
Obtains bean instances from its containing
org.springframework.beans.factory.BeanFactory .
| Methods from org.springframework.aop.target.AbstractBeanFactoryBasedTargetSource: |
|---|
|
copyFrom, equals, getBeanFactory, getTargetBeanName, getTargetClass, hashCode, isStatic, releaseTarget, setBeanFactory, setTargetBeanName, setTargetClass, toString, writeReplace |
| Method from org.springframework.aop.target.PrototypeTargetSource Detail: |
public Object getTarget() throws BeansException {
return newPrototypeInstance();
}
Obtain a new prototype instance for every call. |
public void releaseTarget(Object target) {
destroyPrototypeInstance(target);
}
Destroy the given independent instance. |
public String toString() {
return "PrototypeTargetSource for target bean with name '" + getTargetBeanName() + "'";
}
|