Class PulsarHandler

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

    public abstract class PulsarHandler
    extends PulsarDecoder
    Implementation of the channel handler to process inbound Pulsar data.
    • Field Detail

      • ctx

        protected io.netty.channel.ChannelHandlerContext ctx
      • remoteAddress

        protected java.net.SocketAddress remoteAddress
    • Constructor Detail

      • PulsarHandler

        public PulsarHandler​(int keepAliveInterval,
                             java.util.concurrent.TimeUnit unit)
    • Method Detail

      • getRemoteEndpointProtocolVersion

        public int getRemoteEndpointProtocolVersion()
      • setRemoteEndpointProtocolVersion

        protected void setRemoteEndpointProtocolVersion​(int remoteEndpointProtocolVersion)
      • channelActive

        public void channelActive​(io.netty.channel.ChannelHandlerContext ctx)
                           throws java.lang.Exception
        Specified by:
        channelActive in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelActive in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        java.lang.Exception
      • channelInactive

        public void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)
                             throws java.lang.Exception
        Specified by:
        channelInactive in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        java.lang.Exception
      • cancelKeepAliveTask

        public void cancelKeepAliveTask()
      • isHandshakeCompleted

        protected abstract boolean isHandshakeCompleted()
        Returns:
        true if the connection is ready to use, meaning the Pulsar handshake was already completed