abstract class AbstractLazyCreationTargetSource : TargetSource
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 Useful when you need to pass a reference to some dependency to an object but you don't actually want the dependency to be created until it is first used. A typical scenario for this is a connection to a remote resource. |
|
open class CommonsPool2TargetSource : AbstractPoolingTargetSource, PooledObjectFactory<Any>
org.springframework.aop.TargetSource implementation that holds objects in a configurable Apache Commons2 Pool. By default, an instance of Provides many configuration properties mirroring those of the Commons Pool The Compatible with Apache Commons Pool 2.4, as of Spring 4.2. |
|
open class EmptyTargetSource : TargetSource, Serializable
Canonical |
|
open class HotSwappableTargetSource : TargetSource, Serializable
org.springframework.aop.TargetSource implementation that caches a local target object, but allows the target to be swapped while the application is running. If configuring an object of this class in a Spring IoC container, use constructor injection. This TargetSource is serializable if the target is at the time of serialization. |
|
open class LazyInitTargetSource : AbstractBeanFactoryBasedTargetSource
org.springframework.aop.TargetSource that lazily accesses a singleton bean from a org.springframework.beans.factory.BeanFactory. Useful when a proxy reference is needed on initialization but the actual target object should not be initialized until first use. When the target bean is defined in an org.springframework.context.ApplicationContext (or a For example: The "serviceTarget" bean will not get initialized until a method on the "service" proxy gets invoked.
Subclasses can extend this class and override the |
|
open class PrototypeTargetSource : AbstractPrototypeBasedTargetSource
org.springframework.aop.TargetSource implementation 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. |
|
open class ThreadLocalTargetSource : AbstractPrototypeBasedTargetSource, ThreadLocalTargetSourceStats, DisposableBean
Alternative to an object pool. This org.springframework.aop.TargetSource uses a threading model in which every thread has its own copy of the target. There's no contention for targets. Target object creation is kept to a minimum on the running server. Application code is written as to a normal pool; callers can't assume they will be dealing with the same instance in invocations in different threads. However, state can be relied on during the operations of a single thread: for example, if one caller makes repeated calls on the AOP proxy. Cleanup of thread-bound objects is performed on BeanFactory destruction, calling their |
|
interface ThreadLocalTargetSourceStats
Statistics for a ThreadLocal TargetSource. |