public class MQTTProtocolConverter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
QOS_PROPERTY_NAME |
| Constructor and Description |
|---|
MQTTProtocolConverter(MQTTTransport mqttTransport,
BrokerService brokerService) |
| Modifier and Type | Method and Description |
|---|---|
org.fusesource.mqtt.codec.PUBLISH |
convertMessage(org.apache.activemq.command.ActiveMQMessage message) |
void |
deleteDurableSubs(List<org.apache.activemq.command.SubscriptionInfo> subs) |
int |
getActiveMQSubscriptionPrefetch() |
long |
getDefaultKeepAlive() |
MQTTTransport |
getMQTTTransport() |
MQTTPacketIdGenerator |
getPacketIdGenerator() |
void |
onActiveMQCommand(org.apache.activemq.command.Command command)
Dispatch an ActiveMQ command
|
void |
onMQTTCommand(org.fusesource.mqtt.codec.MQTTFrame frame)
Convert a MQTT command
|
void |
onTransportError() |
void |
restoreDurableSubs(List<org.apache.activemq.command.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
|
protected static final String QOS_PROPERTY_NAME
public MQTTProtocolConverter(MQTTTransport mqttTransport, BrokerService brokerService)
public void onMQTTCommand(org.fusesource.mqtt.codec.MQTTFrame frame)
throws IOException,
javax.jms.JMSException
IOExceptionjavax.jms.JMSExceptionpublic void deleteDurableSubs(List<org.apache.activemq.command.SubscriptionInfo> subs)
public void restoreDurableSubs(List<org.apache.activemq.command.SubscriptionInfo> subs)
public void onActiveMQCommand(org.apache.activemq.command.Command command)
throws Exception
Exceptionpublic org.fusesource.mqtt.codec.PUBLISH convertMessage(org.apache.activemq.command.ActiveMQMessage message)
throws IOException,
javax.jms.JMSException,
DataFormatException
IOExceptionjavax.jms.JMSExceptionDataFormatExceptionpublic 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 The Apache Software Foundation. All Rights Reserved.