public class GroovyCommandMessageProcessor
extends org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<java.lang.Object>
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,
org.springframework.integration.scripting.ScriptVariableGenerator scriptVariableGenerator)
Creates a
GroovyCommandMessageProcessor that will use the provided ScriptVariableGenerator and Binding. |
GroovyCommandMessageProcessor(org.springframework.integration.scripting.ScriptVariableGenerator scriptVariableGenerator)
Creates a
GroovyCommandMessageProcessor that will use the provided ScriptVariableGenerator . |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
executeScript(org.springframework.scripting.ScriptSource scriptSource,
java.util.Map<java.lang.String,java.lang.Object> variables) |
protected java.lang.String |
generateScriptName(org.springframework.messaging.Message<?> message) |
protected org.springframework.scripting.ScriptSource |
getScriptSource(org.springframework.messaging.Message<?> message) |
void |
setCustomizer(org.springframework.scripting.groovy.GroovyObjectCustomizer customizer)
Sets a
GroovyObjectCustomizer for this processor. |
public GroovyCommandMessageProcessor()
GroovyCommandMessageProcessor
that will use the DefaultScriptVariableGenerator
.public GroovyCommandMessageProcessor(org.springframework.integration.scripting.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, org.springframework.integration.scripting.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(org.springframework.scripting.groovy.GroovyObjectCustomizer customizer)
GroovyObjectCustomizer
for this processor.customizer
- The customizer.protected org.springframework.scripting.ScriptSource getScriptSource(org.springframework.messaging.Message<?> message)
getScriptSource
in class org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<java.lang.Object>
protected java.lang.Object executeScript(org.springframework.scripting.ScriptSource scriptSource, java.util.Map<java.lang.String,java.lang.Object> variables) throws java.lang.Exception
executeScript
in class org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<java.lang.Object>
java.lang.Exception
protected java.lang.String generateScriptName(org.springframework.messaging.Message<?> message)