Top Description Fields Constructors Methods
org.springframework.aop.framework.autoproxy.target

public Class QuickTargetSourceCreator

extends AbstractBeanFactoryBasedTargetSourceCreator
Class Inheritance
Imports
org.springframework.aop.target.AbstractBeanFactoryBasedTargetSource, .CommonsPool2TargetSource, .PrototypeTargetSource, .ThreadLocalTargetSource, org.springframework.lang.Nullable

Convenient TargetSourceCreator using bean name prefixes to create one of three well-known TargetSource types:
Authors
Rod Johnson, Stephane Nicoll
See Also
org.springframework.aop.target.CommonsPool2TargetSource, org.springframework.aop.target.ThreadLocalTargetSource, org.springframework.aop.target.PrototypeTargetSource

Field Summary

Modifier and TypeField and Description
public static final String
PREFIX_COMMONS_POOL

The CommonsPool2TargetSource prefix.

public static final String
PREFIX_PROTOTYPE

The PrototypeTargetSource prefix.

public static final String
PREFIX_THREAD_LOCAL

The ThreadLocalTargetSource prefix.

Inherited from org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator:
logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected final AbstractBeanFactoryBasedTargetSource
createBeanFactoryBasedTargetSource(Class<?>
the class of the bean to create a TargetSource for
beanClass
,
String
the name of the bean
beanName
)

Implements abstract org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator.createBeanFactoryBasedTargetSource.

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.

Inherited from org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator:
buildInternalBeanFactorydestroygetBeanFactorygetInternalBeanFactoryForBeangetTargetSourceisPrototypeBasedsetBeanFactory

Field Detail

PREFIX_COMMONS_POOLback to summary
public static final String PREFIX_COMMONS_POOL

The CommonsPool2TargetSource prefix.

PREFIX_PROTOTYPEback to summary
public static final String PREFIX_PROTOTYPE

The PrototypeTargetSource prefix.

PREFIX_THREAD_LOCALback to summary
public static final String PREFIX_THREAD_LOCAL

The ThreadLocalTargetSource prefix.

Constructor Detail

QuickTargetSourceCreatorback to summary
public QuickTargetSourceCreator()

Method Detail

createBeanFactoryBasedTargetSourceback to summary
protected final AbstractBeanFactoryBasedTargetSource createBeanFactoryBasedTargetSource(Class<?> beanClass, String beanName)

Implements abstract org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator.createBeanFactoryBasedTargetSource.

Doc from org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator.createBeanFactoryBasedTargetSource.

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:Class<?>

the class of the bean to create a TargetSource for

beanName:String

the name of the bean

Returns:AbstractBeanFactoryBasedTargetSource

the AbstractPrototypeBasedTargetSource, or null if we don't match this

Annotations
@Override
@Nullable