Class NettyNioEchoChannel
java.lang.Object
org.apache.kafka.common.network.netty.authenticator.NettyNioEchoChannel
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionNettyNioEchoChannel(String id, org.apache.kafka.common.network.Authenticator authenticator) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.kafka.common.security.auth.AuthenticationContextReturns the authentication context for this channel.channel()Returns the underlying channel object.id()Returns the unique identifier for this channel.org.apache.kafka.common.security.auth.KafkaPrincipalReturns the principal associated with this channel.org.apache.kafka.common.network.PublicCredentialReturns the public credential associated with this channel.booleanready()Checks if the channel is ready for communication.
-
Constructor Details
-
NettyNioEchoChannel
-
-
Method Details
-
id
Description copied from interface:NioEchoChannelReturns the unique identifier for this channel.- Specified by:
idin interfaceNioEchoChannel- Returns:
- the channel ID
-
principal
public org.apache.kafka.common.security.auth.KafkaPrincipal principal()Description copied from interface:NioEchoChannelReturns the principal associated with this channel.- Specified by:
principalin interfaceNioEchoChannel- Returns:
- the KafkaPrincipal for this channel
-
publicCredential
public org.apache.kafka.common.network.PublicCredential publicCredential()Description copied from interface:NioEchoChannelReturns the public credential associated with this channel.- Specified by:
publicCredentialin interfaceNioEchoChannel- Returns:
- the PublicCredential for this channel
-
ready
public boolean ready()Description copied from interface:NioEchoChannelChecks if the channel is ready for communication.- Specified by:
readyin interfaceNioEchoChannel- Returns:
- true if the channel is ready, false otherwise
-
authenticationContext
public org.apache.kafka.common.security.auth.AuthenticationContext authenticationContext()Description copied from interface:NioEchoChannelReturns the authentication context for this channel.- Specified by:
authenticationContextin interfaceNioEchoChannel- Returns:
- the AuthenticationContext associated with this channel
-
channel
Description copied from interface:NioEchoChannelReturns the underlying channel object.- Specified by:
channelin interfaceNioEchoChannel- Returns:
- the channel object, could be a KafkaChannel or any other implementation
-