Package org.apache.bookkeeper.proto
Class AuthHandler.ClientSideHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
org.apache.bookkeeper.proto.AuthHandler.ClientSideHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,io.netty.channel.ChannelOutboundHandler
- Enclosing class:
- AuthHandler
static class AuthHandler.ClientSideHandler
extends io.netty.channel.ChannelDuplexHandler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) classNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean(package private) ClientAuthProvider(package private) final ClientAuthProvider.Factory(package private) final ClientConnectionPeer(package private) final AtomicLong -
Constructor Summary
ConstructorsConstructorDescriptionClientSideHandler(ClientAuthProvider.Factory authProviderFactory, AtomicLong transactionIdGenerator, ClientConnectionPeer connectionPeer, boolean isUsingV2Protocol) -
Method Summary
Modifier and TypeMethodDescription(package private) voidauthenticationError(io.netty.channel.ChannelHandlerContext ctx, int errorCode) voidchannelActive(io.netty.channel.ChannelHandlerContext ctx) voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx) voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) (package private) longnewTxnId()voidwrite(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, readMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
authenticated
volatile boolean authenticated -
authProviderFactory
-
authProvider
ClientAuthProvider authProvider -
transactionIdGenerator
-
waitingForAuth
-
connectionPeer
-
-
Constructor Details
-
ClientSideHandler
ClientSideHandler(ClientAuthProvider.Factory authProviderFactory, AtomicLong transactionIdGenerator, ClientConnectionPeer connectionPeer, boolean isUsingV2Protocol)
-
-
Method Details
-
getAuthProvider
-
channelActive
- Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
channelInactive
- Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
channelRead
- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception - Specified by:
writein interfaceio.netty.channel.ChannelOutboundHandler- Overrides:
writein classio.netty.channel.ChannelDuplexHandler- Throws:
Exception
-
newTxnId
long newTxnId() -
authenticationError
void authenticationError(io.netty.channel.ChannelHandlerContext ctx, int errorCode)
-