org.apache.activemq.transport.stomp
Class JmsFrameTranslator
java.lang.Object
org.apache.activemq.transport.stomp.LegacyFrameTranslator
org.apache.activemq.transport.stomp.JmsFrameTranslator
- All Implemented Interfaces:
- FrameTranslator, org.springframework.context.ApplicationContextAware
public class JmsFrameTranslator
- extends LegacyFrameTranslator
- implements org.springframework.context.ApplicationContextAware
Frame translator implementation that uses XStream to convert messages to and
from XML and JSON
- Author:
- Dejan Bosanac
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JmsFrameTranslator
public JmsFrameTranslator()
convertFrame
public ActiveMQMessage convertFrame(ProtocolConverter converter,
StompFrame command)
throws JMSException,
ProtocolException
- Specified by:
convertFrame
in interface FrameTranslator
- Overrides:
convertFrame
in class LegacyFrameTranslator
- Throws:
JMSException
ProtocolException
convertMessage
public StompFrame convertMessage(ProtocolConverter converter,
ActiveMQMessage message)
throws IOException,
JMSException
- Specified by:
convertMessage
in interface FrameTranslator
- Overrides:
convertMessage
in class LegacyFrameTranslator
- Throws:
IOException
JMSException
marshall
protected String marshall(Serializable object,
String transformation)
throws JMSException
- Marshalls the Object to a string using XML or JSON encoding
- Throws:
JMSException
createObjectMessage
protected ActiveMQObjectMessage createObjectMessage(com.thoughtworks.xstream.io.HierarchicalStreamReader in)
throws JMSException
- Throws:
JMSException
createMapMessage
protected ActiveMQMapMessage createMapMessage(com.thoughtworks.xstream.io.HierarchicalStreamReader in)
throws JMSException
- Throws:
JMSException
getXStream
public com.thoughtworks.xstream.XStream getXStream()
setXStream
public void setXStream(com.thoughtworks.xstream.XStream xStream)
createXStream
protected com.thoughtworks.xstream.XStream createXStream()
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.