|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.target.dynamic.AbstractRefreshableTargetSource org.springframework.aop.target.dynamic.BeanFactoryRefreshableTargetSource
public class BeanFactoryRefreshableTargetSource
Refreshable TargetSource that fetches fresh target beans from a BeanFactory.
Can be subclassed to override requiresRefresh()
to suppress
unnecessary refreshes. By default, a refresh will be performed every time
the "refreshCheckDelay" has elapsed.
BeanFactory
,
AbstractRefreshableTargetSource.requiresRefresh()
,
AbstractRefreshableTargetSource.setRefreshCheckDelay(long)
Field Summary |
---|
Fields inherited from class org.springframework.aop.target.dynamic.AbstractRefreshableTargetSource |
---|
logger, targetObject |
Constructor Summary | |
---|---|
BeanFactoryRefreshableTargetSource(BeanFactory beanFactory,
String beanName)
Create a new BeanFactoryRefreshableTargetSource for the given bean factory and bean name. |
Method Summary | |
---|---|
protected Object |
freshTarget()
Retrieve a fresh target object. |
protected Object |
obtainFreshBean(BeanFactory beanFactory,
String beanName)
A template method that subclasses may override to provide a fresh target object for the given bean factory and bean name. |
Methods inherited from class org.springframework.aop.target.dynamic.AbstractRefreshableTargetSource |
---|
getLastRefreshTime, getRefreshCount, getTarget, getTargetClass, isStatic, refresh, releaseTarget, requiresRefresh, setRefreshCheckDelay |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanFactoryRefreshableTargetSource(BeanFactory beanFactory, String beanName)
Note that the passed-in BeanFactory should have an appropriate bean definition set up for the given bean name.
beanFactory
- the BeanFactory to fetch beans frombeanName
- the name of the target beanMethod Detail |
---|
protected final Object freshTarget()
freshTarget
in class AbstractRefreshableTargetSource
protected Object obtainFreshBean(BeanFactory beanFactory, String beanName)
This default implementation fetches a new target bean instance from the bean factory.
BeanFactory.getBean(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |