Interface NioEchoChannel
- All Known Implementing Classes:
KafkaEchoChannel, NettyNioEchoChannel
public interface NioEchoChannel
Represents a channel in the NIO echo server that can be used for testing purposes.
This interface provides methods to access the channel's ID, principal, readiness state,
authentication context, public credential, and the underlying channel object.
-
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.
-
Method Details
-
id
-
principal
org.apache.kafka.common.security.auth.KafkaPrincipal principal()Returns the principal associated with this channel.- Returns:
- the KafkaPrincipal for this channel
-
ready
boolean ready()Checks if the channel is ready for communication.- Returns:
- true if the channel is ready, false otherwise
-
authenticationContext
org.apache.kafka.common.security.auth.AuthenticationContext authenticationContext()Returns the authentication context for this channel.- Returns:
- the AuthenticationContext associated with this channel
-
publicCredential
org.apache.kafka.common.network.PublicCredential publicCredential()Returns the public credential associated with this channel.- Returns:
- the PublicCredential for this channel
-
channel
Object channel()Returns the underlying channel object.- Returns:
- the channel object, could be a KafkaChannel or any other implementation
-