org.jboss.soa.esb.actions.converters
Class XStreamToObject
java.lang.Object
org.jboss.soa.esb.actions.AbstractActionLifecycle
org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
org.jboss.soa.esb.actions.converters.AbstractObjectXStream
org.jboss.soa.esb.actions.converters.XStreamToObject
- All Implemented Interfaces:
- ActionLifecycle, ActionPipelineProcessor
public class XStreamToObject
- extends AbstractObjectXStream
Object to processor.
Uses the XStream processor to generate an XML message String from the supplied object.
Sample Action Configuration:
<Action name="doCustomer" processor="XStreamObject">
<property name="class-alias" value="Customer" /> <!-- Optional. Class alias used in call to XStream.alias(String, Class) prior to deserialisation. -->
<property name="incoming-type" value="CustomerProcessor" /> <!-- Required. Class for incoming type used to process the message after deserialisation. -->
<property name="exclude-package" value="false" /> <!-- Optional. Default "true". Not applicable if a "class-alias" is specified. -->
</Action>
The XML root element is either set from the "class-alias" property or the classes full name. In the later case, the class package is
excluded unless "exclude-package" is set to "false"/"no".
This can be used with ObjectToXStream
- Since:
- Version 4.0
- Author:
- danielmarchant
Method Summary |
Message |
process(Message message)
Processes the message by using the giving class-processor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XStreamToObject
public XStreamToObject(ConfigTree properties)
- Public constructor.
- Parameters:
properties
- Action Properties.
- Throws:
ConfigurationException
- Action not properly configured.
XStreamToObject
public XStreamToObject(java.lang.String actionName,
java.util.List<KeyValuePair> properties)
- Public constructor.
- Parameters:
actionName
- Action name.properties
- 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.