Class GroovyCommandMessageProcessor

java.lang.Object
org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<Object>
org.springframework.integration.groovy.GroovyCommandMessageProcessor
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.integration.handler.MessageProcessor<Object>, org.springframework.integration.IntegrationPattern

public class GroovyCommandMessageProcessor extends org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<Object> implements org.springframework.integration.IntegrationPattern
Since:
2.0
  • Constructor Details

    • 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.
      Parameters:
      scriptVariableGenerator - The variable generator.
    • 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'.
      Parameters:
      binding - The 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'.
      Parameters:
      binding - The binding.
      scriptVariableGenerator - The variable generator.
  • Method Details

    • setCustomizer

      public void setCustomizer(org.springframework.scripting.groovy.GroovyObjectCustomizer customizer)
      Sets a GroovyObjectCustomizer for this processor.
      Parameters:
      customizer - The customizer.
    • getIntegrationPatternType

      public org.springframework.integration.IntegrationPatternType getIntegrationPatternType()
      Specified by:
      getIntegrationPatternType in interface org.springframework.integration.IntegrationPattern
    • getScriptSource

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

      protected Object executeScript(org.springframework.scripting.ScriptSource scriptSource, Map<String,Object> variables)
      Specified by:
      executeScript in class org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<Object>
    • generateScriptName

      protected String generateScriptName(org.springframework.messaging.Message<?> message)