org.springframework.aop.target |
This package contains implementations of the org.springframework.aop.TargetSource interface.
The simplest implementation is the SingletonTargetSource, used by default in the AOP framework
to wrap a single target instance. This is normally appropriate.
Other provided implementations include pooling implementations, that provide a target
from a pool for each request, ensuring a single threaded programming model; and a
"prototype" implementation, that uses a new target instance for each invocation.
|
Java Source File Name | Type | Comment |
AbstractBeanFactoryBasedTargetSource.java | Class | Base class for
org.springframework.aop.TargetSource implementations
that are based on a Spring
org.springframework.beans.factory.BeanFactory ,
delegating to Spring-managed bean instances.
Subclasses can create prototype instances or lazily access a
singleton target, for example. |
AbstractLazyCreationTargetSource.java | Class | org.springframework.aop.TargetSource implementation that will
lazily create a user-managed object.
Creation of the lazy target object is controlled by the user by implementing
the
AbstractLazyCreationTargetSource.createObject() method. |
AbstractPoolingTargetSource.java | Class | Abstract base class for pooling
org.springframework.aop.TargetSource implementations which maintain a pool of target instances, acquiring and
releasing a target object from the pool for each method invocation.
This abstract base class is independent of concrete pooling technology;
see the subclass
CommonsPoolTargetSource for a concrete example.
Subclasses must implement the
AbstractPoolingTargetSource.getTarget and
AbstractPoolingTargetSource.releaseTarget methods based on their chosen object pool.
The
AbstractPoolingTargetSource.newPrototypeInstance() method inherited from
AbstractPrototypeBasedTargetSource can be used to create objects
in order to put them into the pool.
Subclasses must also implement some of the monitoring methods from the
PoolingConfig interface. |
AbstractPrototypeBasedTargetSource.java | Class | Base class for dynamic TargetSources that can create new prototype bean
instances to support a pooling or new-instance-per-invocation strategy. |
CommonsPoolTargetSource.java | Class | TargetSource implementation that holds objects in a configurable
Jakarta Commons Pool.
By default, an instance of GenericObjectPool is created.
Subclasses may change the type of ObjectPool used by
overriding the createObjectPool() method.
Provides many configuration properties mirroring those of the Commons Pool
GenericObjectPool class; these properties are passed to the
GenericObjectPool during construction. |
EmptyTargetSource.java | Class | Canonical TargetSource when there is no target
(or just the target class known), and behavior is supplied
by interfaces and advisors only. |
HotSwappableTargetSource.java | Class | org.springframework.aop.TargetSource implementation that
caches a local target object, but allows the target to be swapped
while the application is running. |
LazyInitTargetSource.java | Class | org.springframework.aop.TargetSource that lazily accesses a
singleton bean from a
org.springframework.beans.factory.BeanFactory . |
PoolingConfig.java | Interface | Config interface for a pooling target source. |
PrototypeTargetSource.java | Class | TargetSource that creates a new instance of the target bean for each
request, destroying each instance on release (after each request). |
SimpleBeanTargetSource.java | Class | Simple
org.springframework.aop.TargetSource implementation,
freshly obtaining the specified target bean from its containing
Spring
org.springframework.beans.factory.BeanFactory . |
SingletonTargetSource.java | Class | Implementation of the
org.springframework.aop.TargetSource interface
that holds a given object. |
ThreadLocalTargetSource.java | Class | Alternative to an object pool. |
ThreadLocalTargetSourceStats.java | Interface | Statistics for a ThreadLocal TargetSource. |