Top Description Fields Constructors Methods
org.springframework.scripting.support

public Class RefreshableScriptTargetSource

extends BeanFactoryRefreshableTargetSource
Class Inheritance
Imports
org.springframework.aop.target.dynamic.BeanFactoryRefreshableTargetSource, org.springframework.beans.factory.BeanFactory, org.springframework.scripting.ScriptFactory, .ScriptSource, org.springframework.util.Assert

Subclass of BeanFactoryRefreshableTargetSource that determines whether a refresh is required through the given ScriptFactory.
Authors
Rob Harrop, Juergen Hoeller, Mark Fisher
Since
2.0

Field Summary

Modifier and TypeField and Description
private final boolean
private final ScriptFactory
private final ScriptSource

Constructor Summary

AccessConstructor and Description
public
RefreshableScriptTargetSource(BeanFactory
the BeanFactory to fetch the scripted bean from
beanFactory
,
String
the name of the target bean
beanName
,
ScriptFactory
the ScriptFactory to delegate to for determining whether a refresh is required
scriptFactory
,
ScriptSource
the ScriptSource for the script definition
scriptSource
,
boolean
whether the target script defines a FactoryBean
isFactoryBean
)

Create a new RefreshableScriptTargetSource.

Method Summary

Modifier and TypeMethod and Description
protected Object
obtainFreshBean(BeanFactory beanFactory, String beanName)

Overrides org.springframework.aop.target.dynamic.BeanFactoryRefreshableTargetSource.obtainFreshBean.

Obtain a fresh target object, retrieving a FactoryBean if necessary.
protected boolean
requiresRefresh()

Overrides org.springframework.aop.target.dynamic.AbstractRefreshableTargetSource.requiresRefresh.

Determine whether a refresh is required through calling ScriptFactory's requiresScriptedObjectRefresh method.
Inherited from org.springframework.aop.target.dynamic.BeanFactoryRefreshableTargetSource:
freshTarget

Field Detail

isFactoryBeanback to summary
private final boolean isFactoryBean
scriptFactoryback to summary
private final ScriptFactory scriptFactory
scriptSourceback to summary
private final ScriptSource scriptSource

Constructor Detail

RefreshableScriptTargetSourceback to summary
public RefreshableScriptTargetSource(BeanFactory beanFactory, String beanName, ScriptFactory scriptFactory, ScriptSource scriptSource, boolean isFactoryBean)

Create a new RefreshableScriptTargetSource.

Parameters
beanFactory:BeanFactory

the BeanFactory to fetch the scripted bean from

beanName:String

the name of the target bean

scriptFactory:ScriptFactory

the ScriptFactory to delegate to for determining whether a refresh is required

scriptSource:ScriptSource

the ScriptSource for the script definition

isFactoryBean:boolean

whether the target script defines a FactoryBean

Method Detail

obtainFreshBeanback to summary
protected Object obtainFreshBean(BeanFactory beanFactory, String beanName)

Overrides org.springframework.aop.target.dynamic.BeanFactoryRefreshableTargetSource.obtainFreshBean.

Obtain a fresh target object, retrieving a FactoryBean if necessary.

Annotations
@Override
requiresRefreshback to summary
protected boolean requiresRefresh()

Overrides org.springframework.aop.target.dynamic.AbstractRefreshableTargetSource.requiresRefresh.

Determine whether a refresh is required through calling ScriptFactory's requiresScriptedObjectRefresh method.

Returns:boolean

Doc from org.springframework.aop.target.dynamic.AbstractRefreshableTargetSource.requiresRefresh.

whether a refresh is required

Annotations
@Override
See Also
ScriptFactory#requiresScriptedObjectRefresh(ScriptSource)