public class RefreshableScriptTargetSource extends BeanFactoryRefreshableTargetSource
BeanFactoryRefreshableTargetSource
that determines whether
a refresh is required through the given ScriptFactory
.Modifier and Type | Field and Description |
---|---|
private boolean |
isFactoryBean |
private ScriptFactory |
scriptFactory |
private ScriptSource |
scriptSource |
logger, targetObject
Constructor and Description |
---|
RefreshableScriptTargetSource(BeanFactory beanFactory,
java.lang.String beanName,
ScriptFactory scriptFactory,
ScriptSource scriptSource,
boolean isFactoryBean)
Create a new RefreshableScriptTargetSource.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
obtainFreshBean(BeanFactory beanFactory,
java.lang.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
getLastRefreshTime, getRefreshCount, getTarget, getTargetClass, isStatic, refresh, releaseTarget, setRefreshCheckDelay
private final ScriptFactory scriptFactory
private final ScriptSource scriptSource
private final boolean isFactoryBean
public RefreshableScriptTargetSource(BeanFactory beanFactory, java.lang.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 AbstractRefreshableTargetSource
ScriptFactory.requiresScriptedObjectRefresh(ScriptSource)
protected java.lang.Object obtainFreshBean(BeanFactory beanFactory, java.lang.String beanName)
obtainFreshBean
in class BeanFactoryRefreshableTargetSource
BeanFactory.getBean(java.lang.String)