Class MQTTProtocolHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    public class MQTTProtocolHandler
    extends io.netty.channel.ChannelInboundHandlerAdapter
    This class is responsible for receiving and sending MQTT packets, delegating behaviour to one of the MQTTConnectionManager, MQTTPublishManager, MQTTSubscriptionManager classes.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void act​(io.netty.handler.codec.mqtt.MqttMessage message)  
      void channelRead​(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)  
      protected void send​(int messageId, java.lang.String topicName, int qosLevel, boolean isRetain, io.netty.buffer.ByteBuf payload, int deliveryCount)  
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • Constructor Detail

      • MQTTProtocolHandler

        public MQTTProtocolHandler​(org.apache.activemq.artemis.core.server.ActiveMQServer server,
                                   MQTTProtocolManager protocolManager)
    • Method Detail

      • channelRead

        public void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                java.lang.Object msg)
        Specified by:
        channelRead in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
      • act

        public void act​(io.netty.handler.codec.mqtt.MqttMessage message)
      • send

        protected void send​(int messageId,
                            java.lang.String topicName,
                            int qosLevel,
                            boolean isRetain,
                            io.netty.buffer.ByteBuf payload,
                            int deliveryCount)