public class RefreshableScriptTargetSource
extends org.springframework.aop.target.dynamic.BeanFactoryRefreshableTargetSource
BeanFactoryRefreshableTargetSource
that determines whether
a refresh is required through the given ScriptFactory
.Constructor and Description |
---|
RefreshableScriptTargetSource(org.springframework.beans.factory.BeanFactory beanFactory,
String beanName,
ScriptFactory scriptFactory,
ScriptSource scriptSource,
boolean isFactoryBean)
Create a new RefreshableScriptTargetSource.
|
Modifier and Type | Method and Description |
---|---|
protected Object |
obtainFreshBean(org.springframework.beans.factory.BeanFactory beanFactory,
String beanName)
Obtain a fresh target object, retrieving a FactoryBean if necessary.
|
protected boolean |
requiresRefresh()
Determine whether a refresh is required through calling
ScriptFactory's
requiresScriptedObjectRefresh method. |
freshTarget
public RefreshableScriptTargetSource(org.springframework.beans.factory.BeanFactory beanFactory, String beanName, ScriptFactory scriptFactory, ScriptSource scriptSource, boolean isFactoryBean)
beanFactory
- the BeanFactory to fetch the scripted bean frombeanName
- the name of the target beanscriptFactory
- the ScriptFactory to delegate to for determining
whether a refresh is requiredscriptSource
- the ScriptSource for the script definitionisFactoryBean
- whether the target script defines a FactoryBeanprotected boolean requiresRefresh()
requiresScriptedObjectRefresh
method.requiresRefresh
in class org.springframework.aop.target.dynamic.AbstractRefreshableTargetSource
ScriptFactory.requiresScriptedObjectRefresh(ScriptSource)
protected Object obtainFreshBean(org.springframework.beans.factory.BeanFactory beanFactory, String beanName)
obtainFreshBean
in class org.springframework.aop.target.dynamic.BeanFactoryRefreshableTargetSource