public class ClientCnx extends PulsarHandler
| Modifier and Type | Field and Description |
|---|---|
protected Authentication |
authentication |
protected AuthenticationDataProvider |
authenticationDataProvider |
protected String |
proxyToTargetBrokerAddress |
protected String |
remoteHostName |
ctx, remoteAddress, remoteEndpointProtocolVersion| Constructor and Description |
|---|
ClientCnx(ClientConfigurationData conf,
io.netty.channel.EventLoopGroup eventLoopGroup) |
ClientCnx(ClientConfigurationData conf,
io.netty.channel.EventLoopGroup eventLoopGroup,
int protocolVersion) |
cancelKeepAliveTask, getRemoteEndpointProtocolVersion, handlePing, handlePong, messageReceivedchannelRead, handleAck, handleAddPartitionToTxn, handleAddSubscriptionToTxn, handleAuthResponse, handleConnect, handleConsumerStats, handleConsumerStatsResponse, handleEndTxn, handleEndTxnOnPartition, handleEndTxnOnSubscription, handleFlow, handleGetLastMessageId, handleGetOrCreateSchema, handleGetSchema, handleGetTopicsOfNamespace, handleLookup, handleNewTxn, handlePartitionMetadataRequest, handleProducer, handleRedeliverUnacknowledged, handleSeek, handleSend, handleSubscribe, handleUnsubscribe, interceptCommandchannelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected final Authentication authentication
protected String proxyToTargetBrokerAddress
protected String remoteHostName
protected AuthenticationDataProvider authenticationDataProvider
public ClientCnx(ClientConfigurationData conf, io.netty.channel.EventLoopGroup eventLoopGroup)
public ClientCnx(ClientConfigurationData conf, io.netty.channel.EventLoopGroup eventLoopGroup, int protocolVersion)
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class PulsarHandlerExceptionprotected io.netty.buffer.ByteBuf newConnectCommand()
throws Exception
Exceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class PulsarHandlerExceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic static boolean isKnownException(Throwable t)
protected void handleConnected(PulsarApi.CommandConnected connected)
handleConnected in class PulsarDecoderprotected void handleAuthChallenge(PulsarApi.CommandAuthChallenge authChallenge)
handleAuthChallenge in class PulsarDecoderprotected void handleSendReceipt(PulsarApi.CommandSendReceipt sendReceipt)
handleSendReceipt in class PulsarDecoderprotected void handleAckResponse(PulsarApi.CommandAckResponse ackResponse)
handleAckResponse in class PulsarDecoderprotected void handleMessage(PulsarApi.CommandMessage cmdMessage, io.netty.buffer.ByteBuf headersAndPayload)
handleMessage in class PulsarDecoderprotected void handleActiveConsumerChange(PulsarApi.CommandActiveConsumerChange change)
handleActiveConsumerChange in class PulsarDecoderprotected void handleSuccess(PulsarApi.CommandSuccess success)
handleSuccess in class PulsarDecoderprotected void handleGetLastMessageIdSuccess(PulsarApi.CommandGetLastMessageIdResponse success)
handleGetLastMessageIdSuccess in class PulsarDecoderprotected void handleProducerSuccess(PulsarApi.CommandProducerSuccess success)
handleProducerSuccess in class PulsarDecoderprotected void handleLookupResponse(PulsarApi.CommandLookupTopicResponse lookupResult)
handleLookupResponse in class PulsarDecoderprotected void handlePartitionResponse(PulsarApi.CommandPartitionedTopicMetadataResponse lookupResult)
handlePartitionResponse in class PulsarDecoderprotected void handleReachedEndOfTopic(PulsarApi.CommandReachedEndOfTopic commandReachedEndOfTopic)
handleReachedEndOfTopic in class PulsarDecoderprotected void handleSendError(PulsarApi.CommandSendError sendError)
handleSendError in class PulsarDecoderprotected void handleError(PulsarApi.CommandError error)
handleError in class PulsarDecoderprotected void handleCloseProducer(PulsarApi.CommandCloseProducer closeProducer)
handleCloseProducer in class PulsarDecoderprotected void handleCloseConsumer(PulsarApi.CommandCloseConsumer closeConsumer)
handleCloseConsumer in class PulsarDecoderprotected boolean isHandshakeCompleted()
isHandshakeCompleted in class PulsarHandlerpublic CompletableFuture<BinaryProtoLookupService.LookupDataResult> newLookup(io.netty.buffer.ByteBuf request, long requestId)
public CompletableFuture<List<String>> newGetTopicsOfNamespace(io.netty.buffer.ByteBuf request, long requestId)
protected void handleGetTopicsOfNamespaceSuccess(PulsarApi.CommandGetTopicsOfNamespaceResponse success)
handleGetTopicsOfNamespaceSuccess in class PulsarDecoderprotected void handleGetSchemaResponse(PulsarApi.CommandGetSchemaResponse commandGetSchemaResponse)
handleGetSchemaResponse in class PulsarDecoderprotected void handleGetOrCreateSchemaResponse(PulsarApi.CommandGetOrCreateSchemaResponse commandGetOrCreateSchemaResponse)
handleGetOrCreateSchemaResponse in class PulsarDecoderpublic io.netty.channel.ChannelHandlerContext ctx()
public CompletableFuture<PulsarApi.MessageIdData> sendGetLastMessageId(io.netty.buffer.ByteBuf request, long requestId)
public CompletableFuture<Optional<SchemaInfo>> sendGetSchema(io.netty.buffer.ByteBuf request, long requestId)
public CompletableFuture<PulsarApi.CommandGetSchemaResponse> sendGetRawSchema(io.netty.buffer.ByteBuf request, long requestId)
public CompletableFuture<byte[]> sendGetOrCreateSchema(io.netty.buffer.ByteBuf request, long requestId)
protected void handleNewTxnResponse(PulsarApi.CommandNewTxnResponse command)
handleNewTxnResponse in class PulsarDecoderprotected void handleAddPartitionToTxnResponse(PulsarApi.CommandAddPartitionToTxnResponse command)
handleAddPartitionToTxnResponse in class PulsarDecoderprotected void handleAddSubscriptionToTxnResponse(PulsarApi.CommandAddSubscriptionToTxnResponse command)
handleAddSubscriptionToTxnResponse in class PulsarDecoderprotected void handleEndTxnOnPartitionResponse(PulsarApi.CommandEndTxnOnPartitionResponse command)
handleEndTxnOnPartitionResponse in class PulsarDecoderprotected void handleEndTxnOnSubscriptionResponse(PulsarApi.CommandEndTxnOnSubscriptionResponse command)
handleEndTxnOnSubscriptionResponse in class PulsarDecoderprotected void handleEndTxnResponse(PulsarApi.CommandEndTxnResponse command)
handleEndTxnResponse in class PulsarDecoderpublic void registerTransactionBufferHandler(TransactionBufferHandler handler)
public void close()
Copyright © 2017–2020 Apache Software Foundation. All rights reserved.