public class ClientCnx extends PulsarHandler
| Modifier and Type | Field and Description |
|---|---|
protected Authentication |
authentication |
protected String |
proxyToTargetBrokerAddress |
ctx, remoteAddress, remoteEndpointProtocolVersionMaxFrameSize, MaxMessageSize| 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, handleConnect, handleConsumerStats, handleConsumerStatsResponse, handleFlow, handleGetLastMessageId, handleGetSchema, handleGetTopicsOfNamespace, handleLookup, handlePartitionMetadataRequest, handleProducer, handleRedeliverUnacknowledged, handleSeek, handleSend, handleSubscribe, handleUnsubscribechannelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected final Authentication authentication
protected String proxyToTargetBrokerAddress
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 PulsarClientException
PulsarClientExceptionpublic 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 handleSendReceipt(PulsarApi.CommandSendReceipt sendReceipt)
handleSendReceipt 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 PulsarDecoderpublic CompletableFuture<PulsarApi.MessageIdData> sendGetLastMessageId(io.netty.buffer.ByteBuf request, long requestId)
public CompletableFuture<Optional<SchemaInfo>> sendGetSchema(io.netty.buffer.ByteBuf request, long requestId)
public void close()
Copyright © 2017–2018 Apache Software Foundation. All rights reserved.