org.jboss.soa.esb.actions.converters
Class ObjectToXStream
java.lang.Object
org.jboss.soa.esb.actions.AbstractActionLifecycle
org.jboss.soa.esb.actions.AbstractActionPipelineProcessor
org.jboss.soa.esb.actions.converters.ObjectToXStream
- All Implemented Interfaces:
- ActionLifecycle, ActionPipelineProcessor
public class ObjectToXStream
- extends AbstractActionPipelineProcessor
Object to XML processor.
Uses the XStream processor to generate an XML message String from the supplied object.
Sample Action Configuration:
<Action name="Customer-To-XML" processor="ObjectToXStream">
<property name="class-alias" value="Customer" /> <!-- Class alias used in call to XStream.alias(String, Class) prior to serialisation. -->
<property name="exclude-package" value="false" /> <!-- 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".
- Since:
- Version 4.0
- Author:
- tom.fennelly@jboss.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectToXStream
public ObjectToXStream(ConfigTree properties)
- Public constructor.
- Parameters:
properties
- Action Properties.
- Throws:
ConfigurationException
- Action not properly configured.
ObjectToXStream
public ObjectToXStream(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
- Description copied from interface:
ActionPipelineProcessor
- Perform the action processing on the specified message.
This method is invoked for each message passing throught the pipeline.
- 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.