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 Classes Modifier and Type Class Description (package private) class
AuthHandler.ClientSideHandler.AuthHandshakeCompleteCallback
(package private) class
AuthHandler.ClientSideHandler.AuthRequestCallback
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
authenticated
(package private) ClientAuthProvider
authProvider
(package private) ClientAuthProvider.Factory
authProviderFactory
(package private) ClientConnectionPeer
connectionPeer
(package private) java.util.concurrent.atomic.AtomicLong
transactionIdGenerator
(package private) java.util.Queue<java.lang.Object>
waitingForAuth
-
Constructor Summary
Constructors Constructor Description ClientSideHandler(ClientAuthProvider.Factory authProviderFactory, java.util.concurrent.atomic.AtomicLong transactionIdGenerator, ClientConnectionPeer connectionPeer, boolean isUsingV2Protocol)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
authenticationError(io.netty.channel.ChannelHandlerContext ctx, int errorCode)
void
channelActive(io.netty.channel.ChannelHandlerContext ctx)
void
channelInactive(io.netty.channel.ChannelHandlerContext ctx)
void
channelRead(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)
ClientAuthProvider
getAuthProvider()
(package private) long
newTxnId()
void
write(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg, io.netty.channel.ChannelPromise promise)
-
Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Field Detail
-
authenticated
volatile boolean authenticated
-
authProviderFactory
final ClientAuthProvider.Factory authProviderFactory
-
authProvider
ClientAuthProvider authProvider
-
transactionIdGenerator
final java.util.concurrent.atomic.AtomicLong transactionIdGenerator
-
waitingForAuth
final java.util.Queue<java.lang.Object> waitingForAuth
-
connectionPeer
final ClientConnectionPeer connectionPeer
-
-
Constructor Detail
-
ClientSideHandler
ClientSideHandler(ClientAuthProvider.Factory authProviderFactory, java.util.concurrent.atomic.AtomicLong transactionIdGenerator, ClientConnectionPeer connectionPeer, boolean isUsingV2Protocol)
-
-
Method Detail
-
getAuthProvider
public ClientAuthProvider getAuthProvider()
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception
- Specified by:
channelActive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelActive
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
java.lang.Exception
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception
- Specified by:
channelInactive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
java.lang.Exception
-
channelRead
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg) throws java.lang.Exception
- Specified by:
channelRead
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
java.lang.Exception
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg, io.netty.channel.ChannelPromise promise) throws java.lang.Exception
- Specified by:
write
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
write
in classio.netty.channel.ChannelDuplexHandler
- Throws:
java.lang.Exception
-
newTxnId
long newTxnId()
-
authenticationError
void authenticationError(io.netty.channel.ChannelHandlerContext ctx, int errorCode)
-
-