|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.soa.esb.actions.scripting.GroovyActionProcessor
public class GroovyActionProcessor
Groovy Scripting action processor.
<action name="groovy" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor">
<property name="script" value="/scripts/helloWorld.groovy" />
</action>
The message is bound on the script under the name "message" and the
configuration is bound under the name "config".
The script can also be supplied to this action as the message payload, allowing you to
dynamically supply the action with script.
| Field Summary | |
|---|---|
protected ConfigTree |
configTree
|
protected groovy.util.GroovyScriptEngine |
scriptEngine
|
| Fields inherited from interface org.jboss.soa.esb.actions.ActionPipelineProcessor |
|---|
PROCESS_EXCEPTION_METHOD, PROCESS_METHOD, PROCESS_SUCCESS_METHOD |
| Constructor Summary | |
|---|---|
GroovyActionProcessor(ConfigTree config)
|
|
| Method Summary | |
|---|---|
void |
destroy()
Destroy the action instance. |
static java.lang.String |
getScriptFromClasspath(java.lang.String scriptPath)
Get the input stream for the Groovy script (from the classpath). |
void |
initialise()
Initialise the action instance. |
Message |
process(Message message)
Processes an ESB message. |
void |
processException(Message message,
java.lang.Throwable th)
Process an exception generated by the pipeline processing. |
void |
processSuccess(Message message)
Process a successful pipeline process. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ConfigTree configTree
protected groovy.util.GroovyScriptEngine scriptEngine
| Constructor Detail |
|---|
public GroovyActionProcessor(ConfigTree config)
throws ConfigurationException
ConfigurationException| Method Detail |
|---|
public void initialise()
throws ActionLifecycleException
ActionLifecycle
initialise in interface ActionLifecycleActionLifecycleException - for errors during initialisation.
public static java.lang.String getScriptFromClasspath(java.lang.String scriptPath)
throws java.io.IOException
scriptPath - The script classpath.
java.io.IOException
public void destroy()
throws ActionLifecycleException
ActionLifecycle
destroy in interface ActionLifecycleActionLifecycleException
public Message process(Message message)
throws ActionProcessingException
process in interface ActionPipelineProcessormessage - The current message being processed.
ActionProcessingException - for errors during processing.
public void processException(Message message,
java.lang.Throwable th)
ActionPipelineProcessor
processException in interface ActionPipelineProcessormessage - The original message.th - The throwable raised by the pipeline processingpublic void processSuccess(Message message)
ActionPipelineProcessor
processSuccess in interface ActionPipelineProcessormessage - The original message.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||