public class GroovyCommandMessageProcessor extends AbstractScriptExecutingMessageProcessor<Object> implements IntegrationPattern
Constructor and Description |
---|
GroovyCommandMessageProcessor()
Creates a
GroovyCommandMessageProcessor that will use the
DefaultScriptVariableGenerator . |
GroovyCommandMessageProcessor(groovy.lang.Binding binding)
Creates a
GroovyCommandMessageProcessor that will use the
DefaultScriptVariableGenerator
and provided Binding . |
GroovyCommandMessageProcessor(groovy.lang.Binding binding,
ScriptVariableGenerator scriptVariableGenerator)
Creates a
GroovyCommandMessageProcessor that will use the provided ScriptVariableGenerator and
Binding. |
GroovyCommandMessageProcessor(ScriptVariableGenerator scriptVariableGenerator)
Creates a
GroovyCommandMessageProcessor that will use the provided ScriptVariableGenerator . |
Modifier and Type | Method and Description |
---|---|
protected Object |
executeScript(ScriptSource scriptSource,
Map<String,Object> variables)
Subclasses must implement this method.
|
protected String |
generateScriptName(Message<?> message) |
IntegrationPatternType |
getIntegrationPatternType()
Return a pattern type this component implements.
|
protected ScriptSource |
getScriptSource(Message<?> message)
Subclasses must implement this method to create a script source,
optionally using the message to locate or create the script.
|
void |
setCustomizer(GroovyObjectCustomizer customizer)
Sets a
GroovyObjectCustomizer for this processor. |
getBeanClassLoader, getBeanFactory, getScriptVariableGenerator, processMessage, setBeanClassLoader, setBeanFactory
public GroovyCommandMessageProcessor()
GroovyCommandMessageProcessor
that will use the
DefaultScriptVariableGenerator
.public GroovyCommandMessageProcessor(ScriptVariableGenerator scriptVariableGenerator)
GroovyCommandMessageProcessor
that will use the provided ScriptVariableGenerator
.scriptVariableGenerator
- The variable generator.public GroovyCommandMessageProcessor(groovy.lang.Binding binding)
GroovyCommandMessageProcessor
that will use the
DefaultScriptVariableGenerator
and provided Binding
.
Provided 'binding' will be used in the BindingOverwriteGroovyObjectCustomizerDecorator
to overwrite
original Groovy Script 'binding'.binding
- The binding.public GroovyCommandMessageProcessor(groovy.lang.Binding binding, ScriptVariableGenerator scriptVariableGenerator)
GroovyCommandMessageProcessor
that will use the provided ScriptVariableGenerator
and
Binding.
Provided 'binding' will be used in the BindingOverwriteGroovyObjectCustomizerDecorator
to overwrite
original Groovy Script 'binding'.binding
- The binding.scriptVariableGenerator
- The variable generator.public void setCustomizer(GroovyObjectCustomizer customizer)
GroovyObjectCustomizer
for this processor.customizer
- The customizer.public IntegrationPatternType getIntegrationPatternType()
IntegrationPattern
getIntegrationPatternType
in interface IntegrationPattern
IntegrationPatternType
this component implements.protected ScriptSource getScriptSource(Message<?> message)
AbstractScriptExecutingMessageProcessor
getScriptSource
in class AbstractScriptExecutingMessageProcessor<Object>
message
- the message being processedprotected Object executeScript(ScriptSource scriptSource, Map<String,Object> variables)
AbstractScriptExecutingMessageProcessor
executeScript
in class AbstractScriptExecutingMessageProcessor<Object>
scriptSource
- The script source.variables
- The variables.