org.springframework.integration.groovy
Class GroovyCommandMessageProcessor

java.lang.Object
  extended by org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<java.lang.Object>
      extended by org.springframework.integration.groovy.GroovyCommandMessageProcessor
All Implemented Interfaces:
org.springframework.integration.handler.MessageProcessor<java.lang.Object>

public class GroovyCommandMessageProcessor
extends org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<java.lang.Object>

Since:
2.0

Constructor Summary
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.
 
Method Summary
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.integration.Message<?> message)
           
protected  org.springframework.scripting.ScriptSource getScriptSource(org.springframework.integration.Message<?> message)
           
 void setCustomizer(org.springframework.scripting.groovy.GroovyObjectCustomizer customizer)
          Sets a GroovyObjectCustomizer for this processor.
 
Methods inherited from class org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor
processMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyCommandMessageProcessor

public GroovyCommandMessageProcessor()
Creates a GroovyCommandMessageProcessor that will use the DefaultScriptVariableGenerator.


GroovyCommandMessageProcessor

public GroovyCommandMessageProcessor(org.springframework.integration.scripting.ScriptVariableGenerator scriptVariableGenerator)
Creates a GroovyCommandMessageProcessor that will use the provided ScriptVariableGenerator.


GroovyCommandMessageProcessor

public GroovyCommandMessageProcessor(groovy.lang.Binding binding)
Creates a GroovyCommandMessageProcessor that will use the DefaultScriptVariableGenerator and provided Binding. Provided 'binding' will be used in the BindingOverwriteGroovyObjectCustomizerDecorator to overwrite original Groovy Script 'binding'.


GroovyCommandMessageProcessor

public GroovyCommandMessageProcessor(groovy.lang.Binding binding,
                                     org.springframework.integration.scripting.ScriptVariableGenerator scriptVariableGenerator)
Creates a GroovyCommandMessageProcessor that will use the provided ScriptVariableGenerator and Binding. Provided 'binding' will be used in the BindingOverwriteGroovyObjectCustomizerDecorator to overwrite original Groovy Script 'binding'.

Method Detail

setCustomizer

public void setCustomizer(org.springframework.scripting.groovy.GroovyObjectCustomizer customizer)
Sets a GroovyObjectCustomizer for this processor.


getScriptSource

protected org.springframework.scripting.ScriptSource getScriptSource(org.springframework.integration.Message<?> message)
Specified by:
getScriptSource in class org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<java.lang.Object>

executeScript

protected java.lang.Object executeScript(org.springframework.scripting.ScriptSource scriptSource,
                                         java.util.Map<java.lang.String,java.lang.Object> variables)
                                  throws java.lang.Exception
Specified by:
executeScript in class org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<java.lang.Object>
Throws:
java.lang.Exception

generateScriptName

protected java.lang.String generateScriptName(org.springframework.integration.Message<?> message)