public class ClientCnx extends PulsarHandler
Modifier and Type | Field and Description |
---|---|
protected Authentication |
authentication |
protected String |
proxyToTargetBrokerAddress |
ctx, remoteAddress, remoteEndpointProtocolVersion
MaxFrameSize, MaxMessageSize
Constructor and Description |
---|
ClientCnx(ClientConfigurationData conf,
io.netty.channel.EventLoopGroup eventLoopGroup) |
cancelKeepAliveTask, getRemoteEndpointProtocolVersion, handlePing, handlePong, messageReceived
channelRead, handleAck, handleConnect, handleConsumerStats, handleConsumerStatsResponse, handleFlow, handleGetLastMessageId, handleGetSchema, handleGetTopicsOfNamespace, handleLookup, handlePartitionMetadataRequest, handleProducer, handleRedeliverUnacknowledged, handleSeek, handleSend, handleSubscribe, handleUnsubscribe
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
protected final Authentication authentication
protected String proxyToTargetBrokerAddress
public ClientCnx(ClientConfigurationData conf, io.netty.channel.EventLoopGroup eventLoopGroup)
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelActive
in interface io.netty.channel.ChannelInboundHandler
channelActive
in class PulsarHandler
Exception
protected io.netty.buffer.ByteBuf newConnectCommand() throws PulsarClientException
PulsarClientException
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class PulsarHandler
Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public static boolean isKnownException(Throwable t)
protected void handleConnected(PulsarApi.CommandConnected connected)
handleConnected
in class PulsarDecoder
protected void handleSendReceipt(PulsarApi.CommandSendReceipt sendReceipt)
handleSendReceipt
in class PulsarDecoder
protected void handleMessage(PulsarApi.CommandMessage cmdMessage, io.netty.buffer.ByteBuf headersAndPayload)
handleMessage
in class PulsarDecoder
protected void handleActiveConsumerChange(PulsarApi.CommandActiveConsumerChange change)
handleActiveConsumerChange
in class PulsarDecoder
protected void handleSuccess(PulsarApi.CommandSuccess success)
handleSuccess
in class PulsarDecoder
protected void handleGetLastMessageIdSuccess(PulsarApi.CommandGetLastMessageIdResponse success)
handleGetLastMessageIdSuccess
in class PulsarDecoder
protected void handleProducerSuccess(PulsarApi.CommandProducerSuccess success)
handleProducerSuccess
in class PulsarDecoder
protected void handleLookupResponse(PulsarApi.CommandLookupTopicResponse lookupResult)
handleLookupResponse
in class PulsarDecoder
protected void handlePartitionResponse(PulsarApi.CommandPartitionedTopicMetadataResponse lookupResult)
handlePartitionResponse
in class PulsarDecoder
protected void handleReachedEndOfTopic(PulsarApi.CommandReachedEndOfTopic commandReachedEndOfTopic)
handleReachedEndOfTopic
in class PulsarDecoder
protected void handleSendError(PulsarApi.CommandSendError sendError)
handleSendError
in class PulsarDecoder
protected void handleError(PulsarApi.CommandError error)
handleError
in class PulsarDecoder
protected void handleCloseProducer(PulsarApi.CommandCloseProducer closeProducer)
handleCloseProducer
in class PulsarDecoder
protected void handleCloseConsumer(PulsarApi.CommandCloseConsumer closeConsumer)
handleCloseConsumer
in class PulsarDecoder
protected boolean isHandshakeCompleted()
isHandshakeCompleted
in class PulsarHandler
public 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 PulsarDecoder
protected void handleGetSchemaResponse(PulsarApi.CommandGetSchemaResponse commandGetSchemaResponse)
handleGetSchemaResponse
in class PulsarDecoder
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 void close()
Copyright © 2017–2018 Apache Software Foundation. All rights reserved.