Class PulsarHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
org.apache.pulsar.common.protocol.PulsarDecoder
org.apache.pulsar.common.protocol.PulsarHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
Implementation of the channel handler to process inbound Pulsar data.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.netty.channel.ChannelHandlerContextprotected SocketAddressFields inherited from class org.apache.pulsar.common.protocol.PulsarDecoder
proxyMessage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidchannelActive(io.netty.channel.ChannelHandlerContext ctx) voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx) intprotected final voidhandlePing(CommandPing ping) protected final voidhandlePong(CommandPong pong) protected abstract booleanprotected final voidprotected voidsetRemoteEndpointProtocolVersion(int remoteEndpointProtocolVersion) Methods inherited from class org.apache.pulsar.common.protocol.PulsarDecoder
channelRead, handleAck, handleAckResponse, handleActiveConsumerChange, handleAddPartitionToTxn, handleAddPartitionToTxnResponse, handleAddSubscriptionToTxn, handleAddSubscriptionToTxnResponse, handleAuthChallenge, handleAuthResponse, handleCloseConsumer, handleCloseProducer, handleCommandWatchTopicList, handleCommandWatchTopicListClose, handleCommandWatchTopicListSuccess, handleCommandWatchTopicUpdate, handleConnect, handleConnected, handleConsumerStats, handleConsumerStatsResponse, handleEndTxn, handleEndTxnOnPartition, handleEndTxnOnPartitionResponse, handleEndTxnOnSubscription, handleEndTxnOnSubscriptionResponse, handleEndTxnResponse, handleError, handleFlow, handleGetLastMessageId, handleGetLastMessageIdSuccess, handleGetOrCreateSchema, handleGetOrCreateSchemaResponse, handleGetSchema, handleGetSchemaResponse, handleGetTopicsOfNamespace, handleGetTopicsOfNamespaceSuccess, handleLookup, handleLookupResponse, handleMessage, handleNewTxn, handleNewTxnResponse, handlePartitionMetadataRequest, handlePartitionResponse, handleProducer, handleProducerSuccess, handleReachedEndOfTopic, handleRedeliverUnacknowledged, handleSeek, handleSend, handleSendError, handleSendReceipt, handleSubscribe, handleSuccess, handleTcClientConnectRequest, handleTcClientConnectResponse, handleUnsubscribe, interceptCommandMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
ctx
protected io.netty.channel.ChannelHandlerContext ctx -
remoteAddress
-
-
Constructor Details
-
PulsarHandler
-
-
Method Details
-
getRemoteEndpointProtocolVersion
public int getRemoteEndpointProtocolVersion() -
setRemoteEndpointProtocolVersion
protected void setRemoteEndpointProtocolVersion(int remoteEndpointProtocolVersion) -
messageReceived
protected final void messageReceived()- Specified by:
messageReceivedin classPulsarDecoder
-
channelActive
- Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
channelInactive
- Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
handlePing
- Overrides:
handlePingin classPulsarDecoder
-
handlePong
- Overrides:
handlePongin classPulsarDecoder
-
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
-