Class ScriptExecutingMessageProcessor
java.lang.Object
org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<Object>
org.springframework.integration.scripting.jsr223.ScriptExecutingMessageProcessor
- All Implemented Interfaces:
- Aware,- BeanClassLoaderAware,- BeanFactoryAware,- MessageProcessor<Object>
public class ScriptExecutingMessageProcessor
extends AbstractScriptExecutingMessageProcessor<Object>
An 
AbstractScriptExecutingMessageProcessor implementation for evaluating scripts
 from the provided ScriptSource in the provided ScriptExecutor against an optional
 binding variables.- Since:
- 2.1
- Author:
- David Turanski, Artem Bilan
- 
Constructor SummaryConstructorsConstructorDescriptionScriptExecutingMessageProcessor(ScriptSource scriptSource, ScriptExecutor scriptExecutor) Create a processor for theScriptSourceusing the providedScriptExecutorusing the DefaultScriptVariableGeneratorScriptExecutingMessageProcessor(ScriptSource scriptSource, ScriptExecutor scriptExecutor, Map<String, Object> variables) Create a processor for theScriptSourceusing the providedScriptExecutorusing the DefaultScriptVariableGeneratorScriptExecutingMessageProcessor(ScriptSource scriptSource, ScriptVariableGenerator scriptVariableGenerator, ScriptExecutor scriptExecutor) Create a processor for theScriptSourceusing the providedScriptExecutor
- 
Method SummaryModifier and TypeMethodDescriptionprotected ObjectexecuteScript(ScriptSource scriptSource, Map<String, Object> variables) Subclasses must implement this method.protected ScriptSourcegetScriptSource(Message<?> message) Subclasses must implement this method to create a script source, optionally using the message to locate or create the script.Methods inherited from class org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessorgetBeanClassLoader, getBeanFactory, getScriptVariableGenerator, processMessage, setBeanClassLoader, setBeanFactory
- 
Constructor Details- 
ScriptExecutingMessageProcessorCreate a processor for theScriptSourceusing the providedScriptExecutorusing the DefaultScriptVariableGenerator- Parameters:
- scriptSource- The script source.
- scriptExecutor- The script executor.
 
- 
ScriptExecutingMessageProcessorpublic ScriptExecutingMessageProcessor(ScriptSource scriptSource, ScriptVariableGenerator scriptVariableGenerator, ScriptExecutor scriptExecutor) Create a processor for theScriptSourceusing the providedScriptExecutor- Parameters:
- scriptSource- The script source.
- scriptVariableGenerator- The script variable generator.
- scriptExecutor- The script executor.
 
- 
ScriptExecutingMessageProcessorpublic ScriptExecutingMessageProcessor(ScriptSource scriptSource, ScriptExecutor scriptExecutor, Map<String, Object> variables) Create a processor for theScriptSourceusing the providedScriptExecutorusing the DefaultScriptVariableGenerator- Parameters:
- scriptSource- The script source.
- scriptExecutor- The script executor.
- variables- The variables.
 
 
- 
- 
Method Details- 
getScriptSourceDescription copied from class:AbstractScriptExecutingMessageProcessorSubclasses must implement this method to create a script source, optionally using the message to locate or create the script.- Specified by:
- getScriptSourcein class- AbstractScriptExecutingMessageProcessor<Object>
- Parameters:
- message- the message being processed
- Returns:
- a ScriptSource to use to create a script
 
- 
executeScriptDescription copied from class:AbstractScriptExecutingMessageProcessorSubclasses must implement this method. In doing so, the execution context for the script should be populated with the provided script variables.- Specified by:
- executeScriptin class- AbstractScriptExecutingMessageProcessor<Object>
- Parameters:
- scriptSource- The script source.
- variables- The variables.
- Returns:
- The result of the execution.
 
 
-