Interface TransportCnx

All Known Implementing Classes:
ServerCnx

public interface TransportCnx
  • Method Details

    • getClientVersion

      String getClientVersion()
    • getProxyVersion

      String getProxyVersion()
    • clientAddress

      SocketAddress clientAddress()
    • clientSourceAddressAndPort

      String clientSourceAddressAndPort()
    • getBrokerService

      BrokerService getBrokerService()
    • getCommandSender

      PulsarCommandSender getCommandSender()
    • isBatchMessageCompatibleVersion

      boolean isBatchMessageCompatibleVersion()
    • getAuthRole

      String getAuthRole()
      The security role for this connection.
      Returns:
      the role
    • getAuthenticationData

      AuthenticationDataSource getAuthenticationData()
    • isActive

      boolean isActive()
    • isWritable

      boolean isWritable()
    • completedSendOperation

      void completedSendOperation(boolean isNonPersistentTopic, int msgSize)
    • removedProducer

      void removedProducer(Producer producer)
    • closeProducer

      void closeProducer(Producer producer)
    • closeProducer

      void closeProducer(Producer producer, Optional<BrokerLookupData> assignedBrokerLookupData)
    • execute

      void execute(Runnable runnable)
    • removedConsumer

      void removedConsumer(Consumer consumer)
    • closeConsumer

      void closeConsumer(Consumer consumer, Optional<BrokerLookupData> assignedBrokerLookupData)
    • isPreciseDispatcherFlowControl

      boolean isPreciseDispatcherFlowControl()
    • newPromise

      io.netty.util.concurrent.Promise<Void> newPromise()
    • hasHAProxyMessage

      boolean hasHAProxyMessage()
    • getHAProxyMessage

      io.netty.handler.codec.haproxy.HAProxyMessage getHAProxyMessage()
    • clientSourceAddress

      String clientSourceAddress()
    • checkConnectionLiveness

      CompletableFuture<Optional<Boolean>> checkConnectionLiveness()
      Check if the connection is still alive by actively sending a Ping message to the client.
      Returns:
      a completable future where the result is true if the connection is alive, false otherwise. The result is empty if the connection liveness check is disabled.
    • incrementThrottleCount

      void incrementThrottleCount()
      Increments the counter that controls the throttling of the connection by pausing reads. The connection will be throttled while the counter is greater than 0.

      The caller is responsible for decrementing the counter by calling decrementThrottleCount() when the connection should no longer be throttled.

    • decrementThrottleCount

      void decrementThrottleCount()
      Decrements the counter that controls the throttling of the connection by pausing reads. The connection will be throttled while the counter is greater than 0.

      This method should be called when the connection should no longer be throttled. However, the caller should have previously called incrementThrottleCount().