|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.target.AbstractPrototypeBasedTargetSource
Base class for dynamic TargetSources that can create new prototype bean instances to support a pooling or new-instance-per-invocation strategy.
Such TargetSources must run in a BeanFactory, as it needs to call the getBean() method to create a new prototype instance.
BeanFactory.getBean(java.lang.String)
Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
AbstractPrototypeBasedTargetSource()
|
Method Summary | |
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware). |
java.lang.String |
getTargetBeanName()
Return the name of the target bean in the factory. |
java.lang.Class |
getTargetClass()
|
boolean |
isStatic()
|
protected java.lang.Object |
newPrototypeInstance()
Subclasses should use this method to create a new prototype instance. |
void |
setBeanFactory(BeanFactory beanFactory)
Set the owning BeanFactory. |
void |
setTargetBeanName(java.lang.String targetBeanName)
Set the name of the target bean in the factory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.aop.TargetSource |
getTarget, releaseTarget |
Field Detail |
protected final org.apache.commons.logging.Log logger
Constructor Detail |
public AbstractPrototypeBasedTargetSource()
Method Detail |
public void setTargetBeanName(java.lang.String targetBeanName)
targetBeanName
- name of the target bean in the BeanFactory
that owns this interceptorpublic java.lang.String getTargetBeanName()
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
beanFactory
- owning BeanFactory (may not be null).
The bean can immediately call methods on the factory.
BeansException
- in case of initialization errorsBeanInitializationException
protected java.lang.Object newPrototypeInstance()
public java.lang.Class getTargetClass()
getTargetClass
in interface TargetSource
public boolean isStatic()
isStatic
in interface TargetSource
public void afterPropertiesSet()
InitializingBean
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet
in interface InitializingBean
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |