org.apache.activemq.util.oxm
Class OXMMessageTransformer

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

public class OXMMessageTransformer
extends AbstractXMLMessageTransformer

Transforms object messages to text messages and vice versa using OXM


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
OXMMessageTransformer()
           
 
Method Summary
 org.springframework.oxm.AbstractMarshaller getMarshaller()
           
protected  String marshall(Session session, ObjectMessage objectMessage)
          Marshalls the Object in the ObjectMessage to a string using XML encoding
 void setMarshaller(org.springframework.oxm.AbstractMarshaller marshaller)
           
protected  Object unmarshall(Session session, 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

OXMMessageTransformer

public OXMMessageTransformer()
Method Detail

getMarshaller

public org.springframework.oxm.AbstractMarshaller getMarshaller()

setMarshaller

public void setMarshaller(org.springframework.oxm.AbstractMarshaller marshaller)

marshall

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

Specified by:
marshall in class AbstractXMLMessageTransformer
Throws:
JMSException

unmarshall

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

Specified by:
unmarshall in class AbstractXMLMessageTransformer
Throws:
JMSException


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.