org.jboss.soa.esb.actions.converters
Class ObjectInvoke

java.lang.Object
  extended by org.jboss.soa.esb.actions.AbstractActionLifecycle
      extended by org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
          extended by org.jboss.soa.esb.actions.converters.ObjectInvoke
All Implemented Interfaces:
ActionLifecycle, ActionPipelineProcessor

public class ObjectInvoke
extends AbstractActionPipelineProcessor

Object to processor.

Uses the XStream processor to generate an XML message String from the supplied object.

Sample Action Configuration:

 <Action name="doCustomer" processor="ObjectInvoke">
     <property name="class-processor" value="CustomerProcessor" /> <!-- Required. Class processor used to process the message . -->
     <property name="class-method" value="fooMethodName" /> <!-- Optional. Default to name of action. -->
 
 </Action>
 

This can be used with ObjectToXStream and XStreamToObject

Since:
Version 4.0
Author:
danielmarchant

Field Summary
 
Fields inherited from interface org.jboss.soa.esb.actions.ActionPipelineProcessor
PROCESS_EXCEPTION_METHOD, PROCESS_METHOD, PROCESS_SUCCESS_METHOD
 
Constructor Summary
ObjectInvoke(ConfigTree configTree)
          Public constructor.
 
Method Summary
protected  java.lang.Object getObjectToInvoke()
          Gets the object that will process the message.
 Message process(Message message)
          Processes the message by using the giving class-processor.
protected  java.lang.reflect.Method setUpMethod(java.lang.Object obj)
          Gets the method to invoke on object.
 
Methods inherited from class org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
processException, processSuccess
 
Methods inherited from class org.jboss.soa.esb.actions.AbstractActionLifecycle
destroy, initialise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.soa.esb.actions.ActionLifecycle
destroy, initialise
 

Constructor Detail

ObjectInvoke

public ObjectInvoke(ConfigTree configTree)
Public constructor.

Parameters:
configTree - Action Properties.
Throws:
ConfigurationException - Action not properly configured.
Method Detail

process

public Message process(Message message)
                throws ActionProcessingException
Processes the message by using the giving class-processor.

Parameters:
message - The current message being processed.
Returns:
The message to be passed to the next stage of the pipeline.
Throws:
ActionProcessingException - for errors during processing.

getObjectToInvoke

protected java.lang.Object getObjectToInvoke()
                                      throws ActionProcessingException
Gets the object that will process the message. Classes can extend this to provide the object in the way they want.

Returns:
Object
Throws:
ActionProcessingException

setUpMethod

protected java.lang.reflect.Method setUpMethod(java.lang.Object obj)
Gets the method to invoke on object.

Parameters:
obj -
Returns:
Method