org.apache.activemq.transport.mqtt
Class MQTTProtocolConverter

java.lang.Object
  extended by org.apache.activemq.transport.mqtt.MQTTProtocolConverter

public class MQTTProtocolConverter
extends Object


Constructor Summary
MQTTProtocolConverter(MQTTTransport mqttTransport, BrokerContext brokerContext)
           
 
Method Summary
 org.fusesource.mqtt.codec.PUBLISH convertMessage(ActiveMQMessage message)
           
 int getActiveMQSubscriptionPrefetch()
           
 long getDefaultKeepAlive()
           
 MQTTTransport getMQTTTransport()
           
 void onActiveMQCommand(Command command)
          Dispatch a ActiveMQ command
 void onMQTTCommand(org.fusesource.mqtt.codec.MQTTFrame frame)
          Convert a MQTT command
 void onTransportError()
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MQTTProtocolConverter

public MQTTProtocolConverter(MQTTTransport mqttTransport,
                             BrokerContext brokerContext)
Method Detail

onMQTTCommand

public void onMQTTCommand(org.fusesource.mqtt.codec.MQTTFrame frame)
                   throws IOException,
                          JMSException
Convert a MQTT command

Throws:
IOException
JMSException

onActiveMQCommand

public void onActiveMQCommand(Command command)
                       throws Exception
Dispatch a ActiveMQ command

Throws:
Exception

convertMessage

public org.fusesource.mqtt.codec.PUBLISH convertMessage(ActiveMQMessage message)
                                                 throws IOException,
                                                        JMSException,
                                                        DataFormatException
Throws:
IOException
JMSException
DataFormatException

getMQTTTransport

public MQTTTransport getMQTTTransport()

onTransportError

public void onTransportError()

getDefaultKeepAlive

public long getDefaultKeepAlive()

setDefaultKeepAlive

public 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

Parameters:
keepAlive - the keepAlive in milliseconds

getActiveMQSubscriptionPrefetch

public int getActiveMQSubscriptionPrefetch()

setActiveMQSubscriptionPrefetch

public void setActiveMQSubscriptionPrefetch(int activeMQSubscriptionPrefetch)
set the default prefetch size when mapping the MQTT subscription to an ActiveMQ one The default = 1

Parameters:
activeMQSubscriptionPrefetch - set the prefetch for the corresponding ActiveMQ subscription


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.