public class JmsFrameTranslator extends LegacyFrameTranslator implements BrokerContextAware
FrameTranslator.Helper
Constructor and Description |
---|
JmsFrameTranslator() |
Modifier and Type | Method and Description |
---|---|
ActiveMQMessage |
convertFrame(ProtocolConverter converter,
StompFrame command) |
StompFrame |
convertMessage(ProtocolConverter converter,
ActiveMQMessage message) |
protected ActiveMQMapMessage |
createMapMessage(com.thoughtworks.xstream.io.HierarchicalStreamReader in) |
protected ActiveMQObjectMessage |
createObjectMessage(com.thoughtworks.xstream.io.HierarchicalStreamReader in) |
protected com.thoughtworks.xstream.XStream |
createXStream() |
BrokerContext |
getBrokerContext() |
com.thoughtworks.xstream.XStream |
getXStream() |
protected String |
marshall(Serializable object,
String transformation)
Marshal the Object to a string using XML or JSON encoding
|
protected String |
marshallAdvisory(DataStructure ds)
Return an Advisory message as a JSON formatted string
|
protected String |
marshallAdvisory(DataStructure ds,
String transformation) |
void |
setBrokerContext(BrokerContext brokerContext) |
void |
setXStream(com.thoughtworks.xstream.XStream xStream) |
convertDestination, convertDestination
public JmsFrameTranslator()
public ActiveMQMessage convertFrame(ProtocolConverter converter, StompFrame command) throws javax.jms.JMSException, ProtocolException
convertFrame
in interface FrameTranslator
convertFrame
in class LegacyFrameTranslator
javax.jms.JMSException
ProtocolException
public StompFrame convertMessage(ProtocolConverter converter, ActiveMQMessage message) throws IOException, javax.jms.JMSException
convertMessage
in interface FrameTranslator
convertMessage
in class LegacyFrameTranslator
IOException
javax.jms.JMSException
protected String marshall(Serializable object, String transformation) throws javax.jms.JMSException
object
- the object to marshaltransformation
- the transformation to apply to the object.javax.jms.JMSException
- if an error occurs during the marshal operation.protected ActiveMQObjectMessage createObjectMessage(com.thoughtworks.xstream.io.HierarchicalStreamReader in) throws javax.jms.JMSException
javax.jms.JMSException
protected ActiveMQMapMessage createMapMessage(com.thoughtworks.xstream.io.HierarchicalStreamReader in) throws javax.jms.JMSException
javax.jms.JMSException
protected String marshallAdvisory(DataStructure ds, String transformation)
public com.thoughtworks.xstream.XStream getXStream()
public void setXStream(com.thoughtworks.xstream.XStream xStream)
protected com.thoughtworks.xstream.XStream createXStream()
public void setBrokerContext(BrokerContext brokerContext)
setBrokerContext
in interface BrokerContextAware
public BrokerContext getBrokerContext()
getBrokerContext
in interface BrokerContextAware
protected String marshallAdvisory(DataStructure ds)
ds
- the DataStructure instance that is being marshaled.Copyright © 2005–2018. All rights reserved.