org.springframework.aop.framework.autoproxy.target
Class AbstractPrototypeBasedTargetSourceCreator
java.lang.Object
org.springframework.aop.framework.autoproxy.target.AbstractPrototypeBasedTargetSourceCreator
- All Implemented Interfaces:
- TargetSourceCreator
- Direct Known Subclasses:
- AbstractPoolingTargetSourceCreator, AttributesPrototypeTargetSourceCreator, AttributesThreadLocalTargetSourceCreator, QuickTargetSourceCreator
- public abstract class AbstractPrototypeBasedTargetSourceCreator
- extends Object
- implements TargetSourceCreator
Convenient superclass for TargetSourceCreators that require creating
multiple instances of a prototype bean.
- Author:
- Rod Johnson
- See Also:
AbstractPrototypeBasedTargetSource
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final Log logger
AbstractPrototypeBasedTargetSourceCreator
public AbstractPrototypeBasedTargetSourceCreator()
getTargetSource
public final TargetSource getTargetSource(Object bean,
String beanName,
BeanFactory factory)
- Description copied from interface:
TargetSourceCreator
- Create a special TargetSource for the given bean, if any.
- Specified by:
getTargetSource
in interface TargetSourceCreator
- Parameters:
bean
- the bean to create a TargetSource forbeanName
- the name of the beanfactory
- the containing factory
- Returns:
- a special TargetSource or null if this TargetSourceCreator isn't
interested in the particular bean
createPrototypeTargetSource
protected abstract AbstractPrototypeBasedTargetSource createPrototypeTargetSource(Object bean,
String beanName,
BeanFactory factory)
- 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's implementation of
getTargetSource()
will do that.
- Returns:
- the AbstractPrototypeBasedTargetSource, or null if we don't match this
Copyright (C) 2003-2004 The Spring Framework Project.