public class ScriptExecutingMessageProcessor extends AbstractScriptExecutingMessageProcessor<Object>
AbstractScriptExecutingMessageProcessor
implementation for evaluating scripts
from the provided ScriptSource
in the provided ScriptExecutor
against an optional
binding variables
.Constructor and Description |
---|
ScriptExecutingMessageProcessor(ScriptSource scriptSource,
ScriptExecutor scriptExecutor)
Create a processor for the
ScriptSource using the provided
ScriptExecutor using the DefaultScriptVariableGenerator |
ScriptExecutingMessageProcessor(ScriptSource scriptSource,
ScriptExecutor scriptExecutor,
Map<String,Object> variables)
Create a processor for the
ScriptSource using the provided
ScriptExecutor using the DefaultScriptVariableGenerator |
ScriptExecutingMessageProcessor(ScriptSource scriptSource,
ScriptVariableGenerator scriptVariableGenerator,
ScriptExecutor scriptExecutor)
Create a processor for the
ScriptSource using the provided
ScriptExecutor |
Modifier and Type | Method and Description |
---|---|
protected Object |
executeScript(ScriptSource scriptSource,
Map<String,Object> variables)
Subclasses must implement this method.
|
protected ScriptSource |
getScriptSource(Message<?> message)
Subclasses must implement this method to create a script source,
optionally using the message to locate or create the script.
|
getBeanClassLoader, getBeanFactory, getScriptVariableGenerator, processMessage, setBeanClassLoader, setBeanFactory
public ScriptExecutingMessageProcessor(ScriptSource scriptSource, ScriptExecutor scriptExecutor)
ScriptSource
using the provided
ScriptExecutor
using the DefaultScriptVariableGeneratorscriptSource
- The script source.scriptExecutor
- The script executor.public ScriptExecutingMessageProcessor(ScriptSource scriptSource, ScriptVariableGenerator scriptVariableGenerator, ScriptExecutor scriptExecutor)
ScriptSource
using the provided
ScriptExecutor
scriptSource
- The script source.scriptVariableGenerator
- The script variable generator.scriptExecutor
- The script executor.public ScriptExecutingMessageProcessor(ScriptSource scriptSource, ScriptExecutor scriptExecutor, Map<String,Object> variables)
ScriptSource
using the provided
ScriptExecutor
using the DefaultScriptVariableGeneratorscriptSource
- The script source.scriptExecutor
- The script executor.variables
- The variables.protected ScriptSource getScriptSource(Message<?> message)
AbstractScriptExecutingMessageProcessor
getScriptSource
in class AbstractScriptExecutingMessageProcessor<Object>
message
- the message being processedprotected Object executeScript(ScriptSource scriptSource, Map<String,Object> variables)
AbstractScriptExecutingMessageProcessor
executeScript
in class AbstractScriptExecutingMessageProcessor<Object>
scriptSource
- The script source.variables
- The variables.