org.apache.activemq.util.oxm
Class XStreamMessageTransformer

java.lang.Object
  extended by org.apache.activemq.MessageTransformerSupport
      extended by org.apache.activemq.util.oxm.AbstractXMLMessageTransformer
          extended by org.apache.activemq.util.oxm.XStreamMessageTransformer
All Implemented Interfaces:
MessageTransformer

public class XStreamMessageTransformer
extends AbstractXMLMessageTransformer

Transforms object messages to text messages and vice versa using XStream


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.activemq.util.oxm.AbstractXMLMessageTransformer
AbstractXMLMessageTransformer.MessageTransform
 
Field Summary
 
Fields inherited from class org.apache.activemq.util.oxm.AbstractXMLMessageTransformer
transformType
 
Constructor Summary
XStreamMessageTransformer()
           
 
Method Summary
protected  com.thoughtworks.xstream.XStream createXStream()
           
 com.thoughtworks.xstream.io.HierarchicalStreamDriver getStreamDriver()
           
 com.thoughtworks.xstream.XStream getXStream()
           
protected  java.lang.String marshall(javax.jms.Session session, javax.jms.ObjectMessage objectMessage)
          Marshalls the Object in the ObjectMessage to a string using XML encoding
 void setStreamDriver(com.thoughtworks.xstream.io.HierarchicalStreamDriver streamDriver)
           
 void setXStream(com.thoughtworks.xstream.XStream xStream)
           
protected  java.lang.Object unmarshall(javax.jms.Session session, javax.jms.TextMessage textMessage)
          Unmarshalls the XML encoded message in the TextMessage to an Object
 
Methods inherited from class org.apache.activemq.util.oxm.AbstractXMLMessageTransformer
consumerTransform, getTransformType, objectToText, producerTransform, setTransformType, textToObject
 
Methods inherited from class org.apache.activemq.MessageTransformerSupport
copyProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XStreamMessageTransformer

public XStreamMessageTransformer()
Method Detail

getXStream

public com.thoughtworks.xstream.XStream getXStream()

setXStream

public void setXStream(com.thoughtworks.xstream.XStream xStream)

getStreamDriver

public com.thoughtworks.xstream.io.HierarchicalStreamDriver getStreamDriver()

setStreamDriver

public void setStreamDriver(com.thoughtworks.xstream.io.HierarchicalStreamDriver streamDriver)

createXStream

protected com.thoughtworks.xstream.XStream createXStream()

marshall

protected java.lang.String marshall(javax.jms.Session session,
                                    javax.jms.ObjectMessage objectMessage)
                             throws javax.jms.JMSException
Marshalls the Object in the ObjectMessage to a string using XML encoding

Specified by:
marshall in class AbstractXMLMessageTransformer
Throws:
javax.jms.JMSException

unmarshall

protected java.lang.Object unmarshall(javax.jms.Session session,
                                      javax.jms.TextMessage textMessage)
                               throws javax.jms.JMSException
Unmarshalls the XML encoded message in the TextMessage to an Object

Specified by:
unmarshall in class AbstractXMLMessageTransformer
Throws:
javax.jms.JMSException


Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.