public class GroovyCommandMessageProcessor extends AbstractScriptExecutingMessageProcessor<java.lang.Object>
beanClassLoader, beanFactory| 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 java.lang.Object |
executeScript(org.springframework.scripting.ScriptSource scriptSource,
java.util.Map<java.lang.String,java.lang.Object> variables)
Subclasses must implement this method.
|
protected java.lang.String |
generateScriptName(org.springframework.messaging.Message<?> message) |
protected org.springframework.scripting.ScriptSource |
getScriptSource(org.springframework.messaging.Message<?> message)
Subclasses must implement this method to create a script source,
optionally using the message to locate or create the script.
|
void |
setCustomizer(org.springframework.scripting.groovy.GroovyObjectCustomizer customizer)
Sets a
GroovyObjectCustomizer for this processor. |
processMessage, setBeanClassLoader, setBeanFactorypublic GroovyCommandMessageProcessor()
GroovyCommandMessageProcessor that will use the DefaultScriptVariableGenerator.public GroovyCommandMessageProcessor(ScriptVariableGenerator scriptVariableGenerator)
GroovyCommandMessageProcessor that will use the provided ScriptVariableGenerator.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'.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'.public void setCustomizer(org.springframework.scripting.groovy.GroovyObjectCustomizer customizer)
GroovyObjectCustomizer for this processor.protected org.springframework.scripting.ScriptSource getScriptSource(org.springframework.messaging.Message<?> message)
AbstractScriptExecutingMessageProcessorgetScriptSource in class AbstractScriptExecutingMessageProcessor<java.lang.Object>message - the message being processedprotected java.lang.Object executeScript(org.springframework.scripting.ScriptSource scriptSource,
java.util.Map<java.lang.String,java.lang.Object> variables)
throws java.lang.Exception
AbstractScriptExecutingMessageProcessorexecuteScript in class AbstractScriptExecutingMessageProcessor<java.lang.Object>java.lang.Exceptionprotected java.lang.String generateScriptName(org.springframework.messaging.Message<?> message)