public class

QuickTargetSourceCreator

extends AbstractBeanFactoryBasedTargetSourceCreator
java.lang.Object
   ↳ org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator
     ↳ org.springframework.aop.framework.autoproxy.target.QuickTargetSourceCreator

Class Overview

Convenient TargetSourceCreator using bean name prefixes to create one of three well-known TargetSource types:

  • : CommonsPoolTargetSource
  • % ThreadLocalTargetSource
  • ! PrototypeTargetSource

  • Summary

    Constants
    String PREFIX_COMMONS_POOL
    String PREFIX_PROTOTYPE
    String PREFIX_THREAD_LOCAL
    [Expand]
    Inherited Fields
    From class org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator
    Public Constructors
    QuickTargetSourceCreator()
    Protected Methods
    final AbstractBeanFactoryBasedTargetSource createBeanFactoryBasedTargetSource(Class beanClass, String beanName)
    Subclasses must implement this method to return a new AbstractPrototypeBasedTargetSource if they wish to create a custom TargetSource for this bean, or null if they are not interested it in, in which case no special target source will be created.
    [Expand]
    Inherited Methods
    From class org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator
    From class java.lang.Object
    From interface org.springframework.aop.framework.autoproxy.TargetSourceCreator
    From interface org.springframework.beans.factory.BeanFactoryAware
    From interface org.springframework.beans.factory.DisposableBean

    Constants

    public static final String PREFIX_COMMONS_POOL

    Constant Value: ":"

    public static final String PREFIX_PROTOTYPE

    Constant Value: "!"

    public static final String PREFIX_THREAD_LOCAL

    Constant Value: "%"

    Public Constructors

    public QuickTargetSourceCreator ()

    Protected Methods

    protected final AbstractBeanFactoryBasedTargetSource createBeanFactoryBasedTargetSource (Class beanClass, String beanName)

    Subclasses must implement this method to return a new AbstractPrototypeBasedTargetSource if they wish to create a custom TargetSource for this bean, or null if they are not interested it in, in which case no special target source will be created. Subclasses should not call setTargetBeanName or setBeanFactory on the AbstractPrototypeBasedTargetSource: This class' implementation of getTargetSource() will do that.

    Parameters
    beanClass the class of the bean to create a TargetSource for
    beanName the name of the bean
    Returns
    • the AbstractPrototypeBasedTargetSource, or null if we don't match this