org.jboss.soa.esb.actions.converters
Class ObjectInvoke
java.lang.Object
org.jboss.soa.esb.actions.AbstractActionLifecycle
org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectInvoke
public ObjectInvoke(ConfigTree configTree)
- Public constructor.
- Parameters:
configTree
- Action Properties.
- Throws:
ConfigurationException
- Action not properly configured.
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