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 java.lang.Object
- implements TargetSourceCreator
Convenient superclass for TargetSourceCreators that require creating
multiple instances of a prototype bean.
- Author:
- Rod Johnson
- See Also:
AbstractPrototypeBasedTargetSource
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
Method Summary |
protected abstract AbstractPrototypeBasedTargetSource |
createPrototypeTargetSource(java.lang.Object bean,
java.lang.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.
|
TargetSource |
getTargetSource(java.lang.Object bean,
java.lang.String beanName,
BeanFactory factory)
Create a special TargetSource for the given bean, if any. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
AbstractPrototypeBasedTargetSourceCreator
public AbstractPrototypeBasedTargetSourceCreator()
getTargetSource
public final TargetSource getTargetSource(java.lang.Object bean,
java.lang.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(java.lang.Object bean,
java.lang.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.