public class ProtocolConverter extends Object
Constructor and Description |
---|
ProtocolConverter(StompTransport stompTransport,
BrokerContext brokerContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterClientAck(StompSubscription subscription,
ArrayList<String> msgIdsToRemove)
Remove all pending acknowledgement markers that are batched into the single
client acknowledge operation.
|
protected void |
checkConnected() |
protected void |
configureInactivityMonitor(String heartBeatConfig) |
StompFrame |
convertMessage(ActiveMQMessage message,
boolean ignoreTransformation) |
ActiveMQMessage |
convertMessage(StompFrame command) |
protected org.apache.activemq.transport.stomp.ResponseHandler |
createResponseHandler(StompFrame command) |
ActiveMQDestination |
createTempDestination(String name,
boolean topic) |
protected FrameTranslator |
findTranslator(String header) |
protected FrameTranslator |
findTranslator(String header,
ActiveMQDestination destination,
boolean advisory) |
protected int |
generateCommandId() |
String |
getCreatedTempDestinationName(ActiveMQDestination destination) |
String |
getDefaultHeartBeat() |
float |
getHbGracePeriodMultiplier() |
StompTransport |
getStompTransport() |
protected void |
handleException(Throwable exception,
StompFrame command) |
void |
onActiveMQCommand(Command command)
Dispatch a ActiveMQ command
|
protected void |
onStompAbort(StompFrame command) |
protected void |
onStompAck(StompFrame command) |
protected void |
onStompBegin(StompFrame command) |
void |
onStompCommand(StompFrame command)
Convert a STOMP command
|
protected void |
onStompCommit(StompFrame command) |
protected void |
onStompConnect(StompFrame command) |
protected void |
onStompDisconnect(StompFrame command) |
protected void |
onStompNack(StompFrame command) |
protected void |
onStompSend(StompFrame command) |
protected void |
onStompSubscribe(StompFrame command) |
protected void |
onStompUnsubscribe(StompFrame command) |
protected Object |
safeGetAction(StompFrame command)
Retrieve the STOMP action value from a frame if the value is valid, otherwise
return an unknown string to allow for safe log output.
|
protected void |
sendReceipt(StompFrame command) |
protected void |
sendToActiveMQ(Command command,
org.apache.activemq.transport.stomp.ResponseHandler handler) |
protected void |
sendToStomp(StompFrame command) |
void |
setDefaultHeartBeat(String defaultHeartBeat) |
void |
setHbGracePeriodMultiplier(float hbGracePeriodMultiplier) |
public ProtocolConverter(StompTransport stompTransport, BrokerContext brokerContext)
protected int generateCommandId()
protected org.apache.activemq.transport.stomp.ResponseHandler createResponseHandler(StompFrame command)
protected void sendToActiveMQ(Command command, org.apache.activemq.transport.stomp.ResponseHandler handler)
protected void sendToStomp(StompFrame command) throws IOException
IOException
protected FrameTranslator findTranslator(String header)
protected FrameTranslator findTranslator(String header, ActiveMQDestination destination, boolean advisory)
public void onStompCommand(StompFrame command) throws IOException, javax.jms.JMSException
command
- IOException
javax.jms.JMSException
protected void handleException(Throwable exception, StompFrame command) throws IOException
IOException
protected void onStompSend(StompFrame command) throws IOException, javax.jms.JMSException
IOException
javax.jms.JMSException
protected void onStompNack(StompFrame command) throws ProtocolException
ProtocolException
protected void onStompAck(StompFrame command) throws ProtocolException
ProtocolException
protected void onStompBegin(StompFrame command) throws ProtocolException
ProtocolException
protected void onStompCommit(StompFrame command) throws ProtocolException
ProtocolException
protected void onStompAbort(StompFrame command) throws ProtocolException
ProtocolException
protected void onStompSubscribe(StompFrame command) throws ProtocolException
ProtocolException
protected void onStompUnsubscribe(StompFrame command) throws ProtocolException
ProtocolException
protected void onStompConnect(StompFrame command) throws ProtocolException
ProtocolException
protected void onStompDisconnect(StompFrame command) throws ProtocolException
ProtocolException
protected void checkConnected() throws ProtocolException
ProtocolException
public void onActiveMQCommand(Command command) throws IOException, javax.jms.JMSException
command
- IOException
javax.jms.JMSException
public ActiveMQMessage convertMessage(StompFrame command) throws IOException, javax.jms.JMSException
IOException
javax.jms.JMSException
public StompFrame convertMessage(ActiveMQMessage message, boolean ignoreTransformation) throws IOException, javax.jms.JMSException
IOException
javax.jms.JMSException
public StompTransport getStompTransport()
public ActiveMQDestination createTempDestination(String name, boolean topic)
public String getCreatedTempDestinationName(ActiveMQDestination destination)
public String getDefaultHeartBeat()
public void setDefaultHeartBeat(String defaultHeartBeat)
public float getHbGracePeriodMultiplier()
public void setHbGracePeriodMultiplier(float hbGracePeriodMultiplier)
hbGracePeriodMultiplier
- the hbGracePeriodMultiplier to setprotected void configureInactivityMonitor(String heartBeatConfig) throws ProtocolException
ProtocolException
protected void sendReceipt(StompFrame command)
protected Object safeGetAction(StompFrame command)
command
- The STOMP command to fetch an action from.protected void afterClientAck(StompSubscription subscription, ArrayList<String> msgIdsToRemove)
subscription
- The STOMP Subscription that has performed a client acknowledge.msgIdsToRemove
- List of message IDs that are bound to the subscription that has ack'dCopyright © 2005–2019 The Apache Software Foundation. All rights reserved.