Class ScriptMessageSourceSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageSourceSpec<ScriptMessageSourceSpec,org.springframework.integration.core.MessageSource<?>>
org.springframework.integration.scripting.dsl.ScriptMessageSourceSpec
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<org.springframework.integration.core.MessageSource<?>>,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,org.springframework.integration.dsl.ComponentsRegistration
public class ScriptMessageSourceSpec extends org.springframework.integration.dsl.MessageSourceSpec<ScriptMessageSourceSpec,org.springframework.integration.core.MessageSource<?>> implements org.springframework.integration.dsl.ComponentsRegistration
The
MessageSourceSpec for Dynamic Language Scripts.
Delegates configuration options to the ScriptSpec.
Produces MessageProcessorMessageSource.
*- Since:
- 5.0
- See Also:
ScriptSpec,MessageProcessorMessageSource
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ScriptMessageSourceSpec(java.lang.String scriptLocation)ScriptMessageSourceSpec(org.springframework.core.io.Resource scriptResource) -
Method Summary
Modifier and Type Method Description protected org.springframework.integration.core.MessageSource<?>doGet()java.util.Map<java.lang.Object,java.lang.String>getComponentsToRegister()ScriptMessageSourceSpeclang(java.lang.String lang)The script lang (Groovy, ruby, python etc.).ScriptMessageSourceSpecrefreshCheckDelay(long refreshCheckDelay)The refreshCheckDelay in milliseconds for refreshable script resource.ScriptMessageSourceSpecvariable(java.lang.String name, java.lang.Object value)The script variable to use.ScriptMessageSourceSpecvariableGenerator(ScriptVariableGenerator variableGenerator)TheScriptVariableGeneratorto use.ScriptMessageSourceSpecvariables(java.util.Map<java.lang.String,java.lang.Object> variables)The script variables to use.ScriptMessageSourceSpecvariables(org.springframework.integration.support.MapBuilder<?,java.lang.String,java.lang.Object> variables)The script variables to use.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
-
Constructor Details
-
ScriptMessageSourceSpec
public ScriptMessageSourceSpec(org.springframework.core.io.Resource scriptResource) -
ScriptMessageSourceSpec
public ScriptMessageSourceSpec(java.lang.String scriptLocation)
-
-
Method Details
-
lang
The script lang (Groovy, ruby, python etc.).- Parameters:
lang- the script lang- Returns:
- the current spec
- See Also:
ScriptSpec.lang(java.lang.String)
-
variableGenerator
TheScriptVariableGeneratorto use.- Parameters:
variableGenerator- theScriptVariableGenerator- Returns:
- the current spec
- See Also:
ScriptSpec.variableGenerator
-
variables
public ScriptMessageSourceSpec variables(org.springframework.integration.support.MapBuilder<?,java.lang.String,java.lang.Object> variables)The script variables to use.- Parameters:
variables- the script variables- Returns:
- the current spec
- See Also:
ScriptSpec.variables(MapBuilder)
-
variables
public ScriptMessageSourceSpec variables(java.util.Map<java.lang.String,java.lang.Object> variables)The script variables to use.- Parameters:
variables- the script variables- Returns:
- the current spec
- See Also:
ScriptSpec.variables(Map)
-
variable
The script variable to use.- Parameters:
name- the name of variablevalue- the value of variable- Returns:
- the current spec
- See Also:
ScriptSpec.variable(java.lang.String, java.lang.Object)
-
refreshCheckDelay
The refreshCheckDelay in milliseconds for refreshable script resource.- Parameters:
refreshCheckDelay- the refresh check delay milliseconds- Returns:
- the current spec
- See Also:
ScriptSpec.refreshCheckDelay(long)
-
doGet
protected org.springframework.integration.core.MessageSource<?> doGet()- Overrides:
doGetin classorg.springframework.integration.dsl.IntegrationComponentSpec<ScriptMessageSourceSpec,org.springframework.integration.core.MessageSource<?>>
-
getComponentsToRegister
public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()- Specified by:
getComponentsToRegisterin interfaceorg.springframework.integration.dsl.ComponentsRegistration
-