Class NettyNioEchoChannel

java.lang.Object
org.apache.kafka.common.network.netty.authenticator.NettyNioEchoChannel
All Implemented Interfaces:
NioEchoChannel

public class NettyNioEchoChannel extends Object implements NioEchoChannel
A Netty implementation of the NioEchoChannel interface that provides methods to access channel ID, principal, readiness state, authentication context, public credential, and the underlying channel object.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NettyNioEchoChannel(String id, org.apache.kafka.common.network.Authenticator authenticator)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.kafka.common.security.auth.AuthenticationContext
    Returns the authentication context for this channel.
    Returns the underlying channel object.
    id()
    Returns the unique identifier for this channel.
    org.apache.kafka.common.security.auth.KafkaPrincipal
    Returns the principal associated with this channel.
    org.apache.kafka.common.network.PublicCredential
    Returns the public credential associated with this channel.
    boolean
    Checks if the channel is ready for communication.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NettyNioEchoChannel

      public NettyNioEchoChannel(String id, org.apache.kafka.common.network.Authenticator authenticator)
  • Method Details

    • id

      public String id()
      Description copied from interface: NioEchoChannel
      Returns the unique identifier for this channel.
      Specified by:
      id in interface NioEchoChannel
      Returns:
      the channel ID
    • principal

      public org.apache.kafka.common.security.auth.KafkaPrincipal principal()
      Description copied from interface: NioEchoChannel
      Returns the principal associated with this channel.
      Specified by:
      principal in interface NioEchoChannel
      Returns:
      the KafkaPrincipal for this channel
    • publicCredential

      public org.apache.kafka.common.network.PublicCredential publicCredential()
      Description copied from interface: NioEchoChannel
      Returns the public credential associated with this channel.
      Specified by:
      publicCredential in interface NioEchoChannel
      Returns:
      the PublicCredential for this channel
    • ready

      public boolean ready()
      Description copied from interface: NioEchoChannel
      Checks if the channel is ready for communication.
      Specified by:
      ready in interface NioEchoChannel
      Returns:
      true if the channel is ready, false otherwise
    • authenticationContext

      public org.apache.kafka.common.security.auth.AuthenticationContext authenticationContext()
      Description copied from interface: NioEchoChannel
      Returns the authentication context for this channel.
      Specified by:
      authenticationContext in interface NioEchoChannel
      Returns:
      the AuthenticationContext associated with this channel
    • channel

      public NettyNioEchoChannel channel()
      Description copied from interface: NioEchoChannel
      Returns the underlying channel object.
      Specified by:
      channel in interface NioEchoChannel
      Returns:
      the channel object, could be a KafkaChannel or any other implementation