java.lang.Object | ||
↳ | org.springframework.aop.target.AbstractBeanFactoryBasedTargetSource | |
↳ | org.springframework.aop.target.AbstractPrototypeBasedTargetSource |
Known Direct Subclasses |
Known Indirect Subclasses |
Base class for dynamic TargetSource implementations that create new prototype bean instances to support a pooling or new-instance-per-invocation strategy.
Such TargetSources must run in a BeanFactory
, as it needs to
call the getBean
method to create a new prototype instance.
Therefore, this base class extends AbstractBeanFactoryBasedTargetSource
.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.aop.target.AbstractBeanFactoryBasedTargetSource
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Set the owning BeanFactory.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Subclasses should call this method to destroy an obsolete prototype instance.
| |||||||||||
Subclasses should call this method to create a new prototype instance.
| |||||||||||
Replaces this object with a SingletonTargetSource on serialization.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.aop.target.AbstractBeanFactoryBasedTargetSource
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.aop.TargetClassAware
| |||||||||||
From interface
org.springframework.aop.TargetSource
| |||||||||||
From interface
org.springframework.beans.factory.BeanFactoryAware
|
Set the owning BeanFactory. We need to save a reference so that we can
use the getBean
method on every invocation.
beanFactory | owning BeanFactory (never null ).
The bean can immediately call methods on the factory. |
---|
BeansException |
---|
Subclasses should call this method to destroy an obsolete prototype instance.
target | the bean instance to destroy |
---|
Subclasses should call this method to create a new prototype instance.
BeansException | if bean creation failed |
---|
Replaces this object with a SingletonTargetSource on serialization.
Protected as otherwise it won't be invoked for subclasses.
(The writeReplace()
method must be visible to the class
being serialized.)
With this implementation of this method, there is no need to mark non-serializable fields in this class or subclasses as transient.
ObjectStreamException |
---|