类 PulsarHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
org.apache.pulsar.common.protocol.PulsarDecoder
org.apache.pulsar.common.protocol.PulsarHandler
所有已实现的接口:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

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

Please see PulsarDecoder javadoc for important details about handle* method parameter instance lifecycle.

  • 字段详细资料

    • ctx

      protected io.netty.channel.ChannelHandlerContext ctx
    • remoteAddress

      protected SocketAddress remoteAddress
  • 构造器详细资料

    • PulsarHandler

      public PulsarHandler(int keepAliveInterval, TimeUnit unit)
  • 方法详细资料

    • getRemoteEndpointProtocolVersion

      public int getRemoteEndpointProtocolVersion()
    • setRemoteEndpointProtocolVersion

      protected void setRemoteEndpointProtocolVersion(int remoteEndpointProtocolVersion)
    • messageReceived

      protected void messageReceived()
      指定者:
      messageReceived 在类中 PulsarDecoder
    • channelActive

      public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      指定者:
      channelActive 在接口中 io.netty.channel.ChannelInboundHandler
      覆盖:
      channelActive 在类中 io.netty.channel.ChannelInboundHandlerAdapter
      抛出:
      Exception
    • channelInactive

      public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      指定者:
      channelInactive 在接口中 io.netty.channel.ChannelInboundHandler
      覆盖:
      channelInactive 在类中 io.netty.channel.ChannelInboundHandlerAdapter
      抛出:
      Exception
    • handlePing

      protected final void handlePing(CommandPing ping)
      覆盖:
      handlePing 在类中 PulsarDecoder
    • handlePong

      protected final void handlePong(CommandPong pong)
      覆盖:
      handlePong 在类中 PulsarDecoder
    • sendPing

      protected io.netty.channel.ChannelFuture sendPing()
    • cancelKeepAliveTask

      public void cancelKeepAliveTask()
    • isHandshakeCompleted

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

      public String toString()
      Demo: [id: 0x2561bcd1, L:/10.0.136.103:6650 ! R:/240.240.0.5:58038]. L: local Address. R: remote address.
      覆盖:
      toString 在类中 Object