org.springframework.aop.framework.autoproxy.target
Class AbstractPrototypeTargetSourceCreator
java.lang.Object
org.springframework.aop.framework.autoproxy.target.AbstractPrototypeTargetSourceCreator
- All Implemented Interfaces:
- TargetSourceCreator
- Direct Known Subclasses:
- AbstractPoolingTargetSourceCreator, AttributesPrototypeTargetSourceCreator, AttributesThreadLocalTargetSourceCreator, QuickTargetSourceCreator
- public abstract class AbstractPrototypeTargetSourceCreator
- extends java.lang.Object
- implements TargetSourceCreator
Convenient superclass for TargetSourceCreators that require creating multiple
instances of a prototype bean.
- Version:
- $Id: AbstractPrototypeTargetSourceCreator.java,v 1.3 2004/03/18 02:46:16 trisberg Exp $
- Author:
- Rod Johnson
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
Method Summary |
protected abstract AbstractPrototypeTargetSource |
createPrototypeTargetSource(java.lang.Object bean,
java.lang.String beanName,
BeanFactory factory)
Subclasses must implement this method to return a new AbstractPrototypeTargetSource
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
AbstractPrototypeTargetSourceCreator
public AbstractPrototypeTargetSourceCreator()
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 AbstractPrototypeTargetSource createPrototypeTargetSource(java.lang.Object bean,
java.lang.String beanName,
BeanFactory factory)
- Subclasses must implement this method to return a new AbstractPrototypeTargetSource
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
AbstractPrototypeTargetSource: this class's implementation of
getTargetSource() will do that.
- Returns:
- null if we don't match this
Copyright (C) 2003-2004 The Spring Framework Project.