Class MQTTSocket

java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.transport.TransportSupport
org.apache.activemq.transport.ws.AbstractMQTTSocket
org.apache.activemq.transport.ws.jetty11.MQTTSocket
All Implemented Interfaces:
org.apache.activemq.broker.BrokerServiceAware, org.apache.activemq.Service, MQTTCodec.MQTTFrameSink, MQTTTransport, org.apache.activemq.transport.Transport, org.eclipse.jetty.websocket.api.WebSocketConnectionListener, org.eclipse.jetty.websocket.api.WebSocketListener

public class MQTTSocket extends AbstractMQTTSocket implements MQTTCodec.MQTTFrameSink, org.eclipse.jetty.websocket.api.WebSocketListener
  • Constructor Details

    • MQTTSocket

      public MQTTSocket(String remoteAddress)
  • Method Details

    • sendToMQTT

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

      public void handleStopped() throws IOException
      Description copied from class: AbstractMQTTSocket
      Called when the transport is stopping to allow the dervied classes a chance to close WebSocket resources.
      Specified by:
      handleStopped in class AbstractMQTTSocket
      Throws:
      IOException - if an error occurs during the stop.
    • onWebSocketBinary

      public void onWebSocketBinary(byte[] bytes, int offset, int length)
      Specified by:
      onWebSocketBinary in interface org.eclipse.jetty.websocket.api.WebSocketListener
    • onWebSocketClose

      public void onWebSocketClose(int arg0, String arg1)
      Specified by:
      onWebSocketClose in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener
    • onWebSocketConnect

      public void onWebSocketConnect(org.eclipse.jetty.websocket.api.Session session)
      Specified by:
      onWebSocketConnect in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener
    • onWebSocketError

      public void onWebSocketError(Throwable arg0)
      Specified by:
      onWebSocketError in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener
    • onWebSocketText

      public void onWebSocketText(String arg0)
      Specified by:
      onWebSocketText in interface org.eclipse.jetty.websocket.api.WebSocketListener
    • onFrame

      public void onFrame(org.fusesource.mqtt.codec.MQTTFrame mqttFrame)
      Specified by:
      onFrame in interface MQTTCodec.MQTTFrameSink