org.apache.activemq.transport.mqtt
Class MQTTTransportFilter

java.lang.Object
  extended by org.apache.activemq.transport.TransportFilter
      extended by org.apache.activemq.transport.mqtt.MQTTTransportFilter
All Implemented Interfaces:
Service, MQTTTransport, Transport, TransportListener

public class MQTTTransportFilter
extends TransportFilter
implements MQTTTransport

The MQTTTransportFilter normally sits on top of a TcpTransport that has been configured with the StompWireFormat and is used to convert MQTT commands to ActiveMQ commands. All of the conversion work is done by delegating to the MQTTProtocolConverter


Field Summary
 
Fields inherited from class org.apache.activemq.transport.TransportFilter
next, transportListener
 
Constructor Summary
MQTTTransportFilter(Transport next, WireFormat wireFormat, BrokerContext brokerContext)
           
 
Method Summary
 MQTTInactivityMonitor getInactivityMonitor()
           
 X509Certificate[] getPeerCertificates()
           
 MQTTWireFormat getWireFormat()
           
 void handleException(IOException e)
           
 boolean isTrace()
           
 void onCommand(Object command)
          called to process a command
 void oneway(Object o)
          A one way asynchronous send
 void sendToActiveMQ(Command command)
           
 void sendToMQTT(org.fusesource.mqtt.codec.MQTTFrame command)
           
 void setInactivityMonitor(MQTTInactivityMonitor monitor)
           
 void setTrace(boolean trace)
           
 
Methods inherited from class org.apache.activemq.transport.TransportFilter
asyncRequest, getNext, getReceiveCounter, getRemoteAddress, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, request, request, setTransportListener, start, stop, toString, transportInterupted, transportResumed, updateURIs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.activemq.transport.mqtt.MQTTTransport
onException, stop
 

Constructor Detail

MQTTTransportFilter

public MQTTTransportFilter(Transport next,
                           WireFormat wireFormat,
                           BrokerContext brokerContext)
Method Detail

oneway

public void oneway(Object o)
            throws IOException
Description copied from interface: Transport
A one way asynchronous send

Specified by:
oneway in interface Transport
Overrides:
oneway in class TransportFilter
Throws:
IOException

onCommand

public void onCommand(Object command)
Description copied from interface: TransportListener
called to process a command

Specified by:
onCommand in interface TransportListener
Overrides:
onCommand in class TransportFilter

sendToActiveMQ

public void sendToActiveMQ(Command command)
Specified by:
sendToActiveMQ in interface MQTTTransport

sendToMQTT

public void sendToMQTT(org.fusesource.mqtt.codec.MQTTFrame command)
                throws IOException
Specified by:
sendToMQTT in interface MQTTTransport
Throws:
IOException

getPeerCertificates

public X509Certificate[] getPeerCertificates()
Specified by:
getPeerCertificates in interface MQTTTransport

isTrace

public boolean isTrace()

setTrace

public void setTrace(boolean trace)

getInactivityMonitor

public MQTTInactivityMonitor getInactivityMonitor()
Specified by:
getInactivityMonitor in interface MQTTTransport

setInactivityMonitor

public void setInactivityMonitor(MQTTInactivityMonitor monitor)

getWireFormat

public MQTTWireFormat getWireFormat()
Specified by:
getWireFormat in interface MQTTTransport

handleException

public void handleException(IOException e)


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.