public class ScriptExecutingMessageProcessor extends AbstractScriptExecutingMessageProcessor<java.lang.Object>
beanClassLoader, beanFactory
Constructor and Description |
---|
ScriptExecutingMessageProcessor(org.springframework.scripting.ScriptSource scriptSource,
ScriptExecutor scriptExecutor)
Create a processor for the
ScriptSource using the provided
ScriptExecutor using the DefaultScriptVariableGenerator |
ScriptExecutingMessageProcessor(org.springframework.scripting.ScriptSource scriptSource,
ScriptExecutor scriptExecutor,
java.util.Map<java.lang.String,java.lang.Object> variables)
Create a processor for the
ScriptSource using the provided
ScriptExecutor using the DefaultScriptVariableGenerator |
ScriptExecutingMessageProcessor(org.springframework.scripting.ScriptSource scriptSource,
ScriptVariableGenerator scriptVariableGenerator,
ScriptExecutor scriptExecutor)
Create a processor for the
ScriptSource using the provided
ScriptExecutor |
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 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.
|
processMessage, setBeanClassLoader, setBeanFactory
public ScriptExecutingMessageProcessor(org.springframework.scripting.ScriptSource scriptSource, ScriptExecutor scriptExecutor)
ScriptSource
using the provided
ScriptExecutor
using the DefaultScriptVariableGeneratorscriptSource
- The script source.scriptExecutor
- The script executor.public ScriptExecutingMessageProcessor(org.springframework.scripting.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(org.springframework.scripting.ScriptSource scriptSource, ScriptExecutor scriptExecutor, java.util.Map<java.lang.String,java.lang.Object> variables)
ScriptSource
using the provided
ScriptExecutor
using the DefaultScriptVariableGeneratorscriptSource
- The script source.scriptExecutor
- The script executor.variables
- The variables.protected org.springframework.scripting.ScriptSource getScriptSource(org.springframework.messaging.Message<?> message)
AbstractScriptExecutingMessageProcessor
getScriptSource
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
AbstractScriptExecutingMessageProcessor
executeScript
in class AbstractScriptExecutingMessageProcessor<java.lang.Object>
scriptSource
- The script source.variables
- The variables.java.lang.Exception
- Any Exception.