类 ClientCnx
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
org.apache.pulsar.common.protocol.PulsarDecoder
org.apache.pulsar.common.protocol.PulsarHandler
org.apache.pulsar.client.impl.ClientCnx
- 所有已实现的接口:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
Channel handler for the Pulsar client.
Please see PulsarDecoder javadoc for important details about handle* method
parameter instance lifecycle.
-
嵌套类概要
嵌套类从接口继承的嵌套类/接口 io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
字段概要
字段修饰符和类型字段说明protected final Authenticationprotected AuthenticationDataProviderprotected final intprotected Stringprotected Stringprotected ClientCnx.State从类继承的字段 org.apache.pulsar.common.protocol.PulsarHandler
ctx从类继承的字段 org.apache.pulsar.common.protocol.PulsarDecoder
proxyMessage -
构造器概要
构造器构造器说明ClientCnx(InstrumentProvider instrumentProvider, ClientConfigurationData conf, io.netty.channel.EventLoopGroup eventLoopGroup) ClientCnx(InstrumentProvider instrumentProvider, ClientConfigurationData conf, io.netty.channel.EventLoopGroup eventLoopGroup, int protocolVersion) -
方法概要
修饰符和类型方法说明voidchannelActive(io.netty.channel.ChannelHandlerContext ctx) voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx) voidclose()protected voidio.netty.channel.ChannelHandlerContextctx()voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) longstatic PulsarClientExceptiongetPulsarClientException(ServerError error, String errorMsg) protected voidhandleAckResponse(CommandAckResponse ackResponse) protected voidprotected voidprotected voidprotected voidhandleAuthChallenge(CommandAuthChallenge authChallenge) protected voidhandleCloseConsumer(CommandCloseConsumer closeConsumer) protected voidhandleCloseProducer(CommandCloseProducer closeProducer) protected voidhandleCommandWatchTopicListSuccess(CommandWatchTopicListSuccess commandWatchTopicListSuccess) protected voidhandleCommandWatchTopicUpdate(CommandWatchTopicUpdate commandWatchTopicUpdate) protected voidhandleConnected(CommandConnected connected) protected voidprotected voidprotected voidprotected voidhandleError(CommandError error) protected voidprotected voidhandleGetOrCreateSchemaResponse(CommandGetOrCreateSchemaResponse commandGetOrCreateSchemaResponse) protected voidhandleGetSchemaResponse(CommandGetSchemaResponse commandGetSchemaResponse) protected voidprotected voidhandleLookupResponse(CommandLookupTopicResponse lookupResult) protected voidhandleMessage(CommandMessage cmdMessage, io.netty.buffer.ByteBuf headersAndPayload) protected voidprotected voidprotected voidprotected voidhandleReachedEndOfTopic(CommandReachedEndOfTopic commandReachedEndOfTopic) protected voidhandleSendError(CommandSendError sendError) protected voidhandleSendReceipt(CommandSendReceipt sendReceipt) protected voidhandleSuccess(CommandSuccess success) protected voidprotected voidhandleTopicMigrated(CommandTopicMigrated commandTopicMigrated) booleanCheck client connection is now free.protected booleanstatic booleannewAckForReceipt(io.netty.buffer.ByteBuf request, long requestId) voidnewAckForReceiptWithFuture(io.netty.buffer.ByteBuf request, long requestId, TimedCompletableFuture<Void> future) protected io.netty.buffer.ByteBufnewGetTopicsOfNamespace(io.netty.buffer.ByteBuf request, long requestId) newLookup(io.netty.buffer.ByteBuf request, long requestId) newWatchTopicList(BaseCommand commandWatchTopicList, long requestId) newWatchTopicListClose(BaseCommand commandWatchTopicListClose, long requestId) voidsendGetLastMessageId(io.netty.buffer.ByteBuf request, long requestId) CompletableFuture<byte[]>sendGetOrCreateSchema(io.netty.buffer.ByteBuf request, long requestId) sendGetRawSchema(io.netty.buffer.ByteBuf request, long requestId) sendGetSchema(io.netty.buffer.ByteBuf request, long requestId) voiduserEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) 从类继承的方法 org.apache.pulsar.common.protocol.PulsarHandler
cancelKeepAliveTask, getRemoteEndpointProtocolVersion, handlePing, handlePong, messageReceived, sendPing, setRemoteEndpointProtocolVersion, toString从类继承的方法 org.apache.pulsar.common.protocol.PulsarDecoder
channelRead, handleAck, handleAddPartitionToTxn, handleAddSubscriptionToTxn, handleAuthResponse, handleCommandWatchTopicList, handleCommandWatchTopicListClose, handleConnect, handleConsumerStats, handleConsumerStatsResponse, handleEndTxn, handleEndTxnOnPartition, handleEndTxnOnSubscription, handleFlow, handleGetLastMessageId, handleGetOrCreateSchema, handleGetSchema, handleGetTopicsOfNamespace, handleLookup, handleNewTxn, handlePartitionMetadataRequest, handleProducer, handleRedeliverUnacknowledged, handleSeek, handleSend, handleSubscribe, handleTcClientConnectRequest, handleUnsubscribe, interceptCommand从类继承的方法 io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged从类继承的方法 io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
字段详细资料
-
authentication
-
state
-
protocolVersion
protected final int protocolVersion -
proxyToTargetBrokerAddress
-
remoteHostName
-
authenticationDataProvider
-
-
构造器详细资料
-
ClientCnx
public ClientCnx(InstrumentProvider instrumentProvider, ClientConfigurationData conf, io.netty.channel.EventLoopGroup eventLoopGroup) -
ClientCnx
public ClientCnx(InstrumentProvider instrumentProvider, ClientConfigurationData conf, io.netty.channel.EventLoopGroup eventLoopGroup, int protocolVersion)
-
-
方法详细资料
-
channelActive
- 指定者:
channelActive在接口中io.netty.channel.ChannelInboundHandler- 覆盖:
channelActive在类中PulsarHandler- 抛出:
Exception
-
newConnectCommand
- 抛出:
Exception
-
channelInactive
- 指定者:
channelInactive在接口中io.netty.channel.ChannelInboundHandler- 覆盖:
channelInactive在类中PulsarHandler- 抛出:
Exception
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception - 指定者:
exceptionCaught在接口中io.netty.channel.ChannelHandler- 指定者:
exceptionCaught在接口中io.netty.channel.ChannelInboundHandler- 覆盖:
exceptionCaught在类中io.netty.channel.ChannelInboundHandlerAdapter- 抛出:
Exception
-
isKnownException
-
getDuplicatedResponseCount
public long getDuplicatedResponseCount() -
handleConnected
- 覆盖:
handleConnected在类中PulsarDecoder
-
handleAuthChallenge
- 覆盖:
handleAuthChallenge在类中PulsarDecoder
-
handleSendReceipt
- 覆盖:
handleSendReceipt在类中PulsarDecoder
-
handleAckResponse
- 覆盖:
handleAckResponse在类中PulsarDecoder
-
handleMessage
- 覆盖:
handleMessage在类中PulsarDecoder
-
handleActiveConsumerChange
-
handleSuccess
- 覆盖:
handleSuccess在类中PulsarDecoder
-
handleGetLastMessageIdSuccess
-
handleProducerSuccess
- 覆盖:
handleProducerSuccess在类中PulsarDecoder
-
handleLookupResponse
- 覆盖:
handleLookupResponse在类中PulsarDecoder
-
handlePartitionResponse
- 覆盖:
handlePartitionResponse在类中PulsarDecoder
-
handleReachedEndOfTopic
- 覆盖:
handleReachedEndOfTopic在类中PulsarDecoder
-
handleTopicMigrated
- 覆盖:
handleTopicMigrated在类中PulsarDecoder
-
handleSendError
- 覆盖:
handleSendError在类中PulsarDecoder
-
handleError
- 覆盖:
handleError在类中PulsarDecoder
-
handleCloseProducer
- 覆盖:
handleCloseProducer在类中PulsarDecoder
-
handleCloseConsumer
- 覆盖:
handleCloseConsumer在类中PulsarDecoder
-
isHandshakeCompleted
protected boolean isHandshakeCompleted()- 指定者:
isHandshakeCompleted在类中PulsarHandler
-
newLookup
public CompletableFuture<BinaryProtoLookupService.LookupDataResult> newLookup(io.netty.buffer.ByteBuf request, long requestId) -
newGetTopicsOfNamespace
public CompletableFuture<GetTopicsResult> newGetTopicsOfNamespace(io.netty.buffer.ByteBuf request, long requestId) -
newAckForReceipt
-
newAckForReceiptWithFuture
public void newAckForReceiptWithFuture(io.netty.buffer.ByteBuf request, long requestId, TimedCompletableFuture<Void> future) -
handleGetTopicsOfNamespaceSuccess
-
handleGetSchemaResponse
- 覆盖:
handleGetSchemaResponse在类中PulsarDecoder
-
handleGetOrCreateSchemaResponse
protected void handleGetOrCreateSchemaResponse(CommandGetOrCreateSchemaResponse commandGetOrCreateSchemaResponse) -
ctx
public io.netty.channel.ChannelHandlerContext ctx() -
sendGetLastMessageId
public CompletableFuture<CommandGetLastMessageIdResponse> sendGetLastMessageId(io.netty.buffer.ByteBuf request, long requestId) -
sendGetSchema
public CompletableFuture<Optional<SchemaInfo>> sendGetSchema(io.netty.buffer.ByteBuf request, long requestId) -
sendGetRawSchema
public CompletableFuture<CommandGetSchemaResponse> sendGetRawSchema(io.netty.buffer.ByteBuf request, long requestId) -
sendGetOrCreateSchema
public CompletableFuture<byte[]> sendGetOrCreateSchema(io.netty.buffer.ByteBuf request, long requestId) -
handleNewTxnResponse
- 覆盖:
handleNewTxnResponse在类中PulsarDecoder
-
handleAddPartitionToTxnResponse
-
handleAddSubscriptionToTxnResponse
-
handleEndTxnOnPartitionResponse
-
handleEndTxnOnSubscriptionResponse
-
handleEndTxnResponse
- 覆盖:
handleEndTxnResponse在类中PulsarDecoder
-
handleTcClientConnectResponse
-
newWatchTopicList
public CompletableFuture<CommandWatchTopicListSuccess> newWatchTopicList(BaseCommand commandWatchTopicList, long requestId) -
newWatchTopicListClose
public CompletableFuture<CommandSuccess> newWatchTopicListClose(BaseCommand commandWatchTopicListClose, long requestId) -
handleCommandWatchTopicListSuccess
protected void handleCommandWatchTopicListSuccess(CommandWatchTopicListSuccess commandWatchTopicListSuccess) -
handleCommandWatchTopicUpdate
-
registerTransactionBufferHandler
-
getPulsarClientException
-
close
public void close() -
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception - 指定者:
userEventTriggered在接口中io.netty.channel.ChannelInboundHandler- 覆盖:
userEventTriggered在类中io.netty.channel.ChannelInboundHandlerAdapter- 抛出:
Exception
-
closeWithException
-
idleCheck
public boolean idleCheck()Check client connection is now free. This method will not change the state to idle.- 返回:
- true if the connection is eligible.
-