public class ScriptMessageSourceSpec extends MessageSourceSpec<ScriptMessageSourceSpec,MessageSource<?>> implements ComponentsRegistration
MessageSourceSpec
for Dynamic Language Scripts.
Delegates configuration options to the ScriptSpec
.
Produces MessageProcessorMessageSource
.
*ScriptSpec
,
MessageProcessorMessageSource
PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Constructor and Description |
---|
ScriptMessageSourceSpec(Resource scriptResource) |
ScriptMessageSourceSpec(String scriptLocation) |
Modifier and Type | Method and Description |
---|---|
protected MessageSource<?> |
doGet() |
Map<Object,String> |
getComponentsToRegister() |
ScriptMessageSourceSpec |
lang(String lang)
The script lang (Groovy, ruby, python etc.).
|
ScriptMessageSourceSpec |
refreshCheckDelay(long refreshCheckDelay)
The refreshCheckDelay in milliseconds for refreshable script resource.
|
ScriptMessageSourceSpec |
variable(String name,
Object value)
The script variable to use.
|
ScriptMessageSourceSpec |
variableGenerator(ScriptVariableGenerator variableGenerator)
The
ScriptVariableGenerator to use. |
ScriptMessageSourceSpec |
variables(Map<String,Object> variables)
The script variables to use.
|
ScriptMessageSourceSpec |
variables(MapBuilder<?,String,Object> variables)
The script variables to use.
|
messageHeaders
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
public ScriptMessageSourceSpec(Resource scriptResource)
public ScriptMessageSourceSpec(String scriptLocation)
public ScriptMessageSourceSpec lang(String lang)
lang
- the script langScriptSpec.lang(java.lang.String)
public ScriptMessageSourceSpec variableGenerator(ScriptVariableGenerator variableGenerator)
ScriptVariableGenerator
to use.variableGenerator
- the ScriptVariableGenerator
ScriptSpec.variableGenerator
public ScriptMessageSourceSpec variables(MapBuilder<?,String,Object> variables)
variables
- the script variablesScriptSpec.variables(MapBuilder)
public ScriptMessageSourceSpec variables(Map<String,Object> variables)
variables
- the script variablesScriptSpec.variables(Map)
public ScriptMessageSourceSpec variable(String name, Object value)
name
- the name of variablevalue
- the value of variableScriptSpec.variable(java.lang.String, java.lang.Object)
public ScriptMessageSourceSpec refreshCheckDelay(long refreshCheckDelay)
refreshCheckDelay
- the refresh check delay millisecondsScriptSpec.refreshCheckDelay(long)
protected MessageSource<?> doGet()
doGet
in class IntegrationComponentSpec<ScriptMessageSourceSpec,MessageSource<?>>
public Map<Object,String> getComponentsToRegister()
getComponentsToRegister
in interface ComponentsRegistration