站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

QuickTargetSourceCreator (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.aop.framework.autoproxy.target
Class QuickTargetSourceCreator

java.lang.Object
  extended by org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator
      extended by org.springframework.aop.framework.autoproxy.target.QuickTargetSourceCreator
All Implemented Interfaces:
TargetSourceCreator, BeanFactoryAware, DisposableBean

public class QuickTargetSourceCreator
extends AbstractBeanFactoryBasedTargetSourceCreator

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

  • : CommonsPoolTargetSource
  • % ThreadLocalTargetSource
  • ! PrototypeTargetSource

    Author:
    Rod Johnson
    See Also:
    CommonsPoolTargetSource, ThreadLocalTargetSource, PrototypeTargetSource

    Field Summary
    static String PREFIX_COMMONS_POOL
               
    static String PREFIX_PROTOTYPE
               
    static String PREFIX_THREAD_LOCAL
               
     
    Fields inherited from class org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator
    logger
     
    Constructor Summary
    QuickTargetSourceCreator()
               
     
    Method Summary
    protected  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.
     
    Methods inherited from class org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator
    destroy, getBeanFactory, getTargetSource, isPrototypeBased, setBeanFactory
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    PREFIX_COMMONS_POOL

    public static final String PREFIX_COMMONS_POOL
    See Also:
    Constant Field Values

    PREFIX_THREAD_LOCAL

    public static final String PREFIX_THREAD_LOCAL
    See Also:
    Constant Field Values

    PREFIX_PROTOTYPE

    public static final String PREFIX_PROTOTYPE
    See Also:
    Constant Field Values
    Constructor Detail

    QuickTargetSourceCreator

    public QuickTargetSourceCreator()
    Method Detail

    createBeanFactoryBasedTargetSource

    protected final AbstractBeanFactoryBasedTargetSource createBeanFactoryBasedTargetSource(Class beanClass,
                                                                                            String beanName)
    Description copied from class: AbstractBeanFactoryBasedTargetSourceCreator
    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.

    Specified by:
    createBeanFactoryBasedTargetSource in class AbstractBeanFactoryBasedTargetSourceCreator
    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

    The Spring Framework

    Copyright © 2002-2007 The Spring Framework.