public class MQTTProtocolConverter
extends java.lang.Object
| Constructor and Description |
|---|
MQTTProtocolConverter(MQTTTransport mqttTransport,
BrokerService brokerService) |
| Modifier and Type | Method and Description |
|---|---|
org.fusesource.mqtt.codec.PUBLISH |
convertMessage(ActiveMQMessage message) |
void |
deleteDurableSubs(java.util.List<SubscriptionInfo> subs) |
int |
getActiveMQSubscriptionPrefetch() |
long |
getDefaultKeepAlive() |
MQTTTransport |
getMQTTTransport() |
MQTTPacketIdGenerator |
getPacketIdGenerator() |
void |
onActiveMQCommand(Command command)
Dispatch a ActiveMQ command
|
void |
onMQTTCommand(org.fusesource.mqtt.codec.MQTTFrame frame)
Convert a MQTT command
|
void |
onTransportError() |
void |
restoreDurableSubs(java.util.List<SubscriptionInfo> subs) |
void |
setActiveMQSubscriptionPrefetch(int activeMQSubscriptionPrefetch)
set the default prefetch size when mapping the MQTT subscription to an ActiveMQ one
The default = 1
|
void |
setDefaultKeepAlive(long keepAlive)
Set the default keep alive time (in milliseconds) that would be used if configured on server side
and the client sends a keep-alive value of 0 (zero) on a CONNECT frame
|
public MQTTProtocolConverter(MQTTTransport mqttTransport, BrokerService brokerService)
public void onMQTTCommand(org.fusesource.mqtt.codec.MQTTFrame frame)
throws java.io.IOException,
javax.jms.JMSException
java.io.IOExceptionjavax.jms.JMSExceptionpublic void deleteDurableSubs(java.util.List<SubscriptionInfo> subs)
public void restoreDurableSubs(java.util.List<SubscriptionInfo> subs)
public void onActiveMQCommand(Command command) throws java.lang.Exception
java.lang.Exceptionpublic org.fusesource.mqtt.codec.PUBLISH convertMessage(ActiveMQMessage message) throws java.io.IOException, javax.jms.JMSException, java.util.zip.DataFormatException
java.io.IOExceptionjavax.jms.JMSExceptionjava.util.zip.DataFormatExceptionpublic MQTTTransport getMQTTTransport()
public void onTransportError()
public long getDefaultKeepAlive()
public void setDefaultKeepAlive(long keepAlive)
keepAlive - the keepAlive in millisecondspublic int getActiveMQSubscriptionPrefetch()
public void setActiveMQSubscriptionPrefetch(int activeMQSubscriptionPrefetch)
activeMQSubscriptionPrefetch - set the prefetch for the corresponding ActiveMQ subscriptionpublic MQTTPacketIdGenerator getPacketIdGenerator()
Copyright © 2005-2014 Red Hat, Inc.. All Rights Reserved.