Package org.apache.bookkeeper.proto
Class BookieRequestHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- org.apache.bookkeeper.proto.BookieRequestHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
public class BookieRequestHandler extends io.netty.channel.ChannelInboundHandlerAdapter
Serverside handler for bookkeeper requests.
-
-
Constructor Summary
Constructors Constructor Description BookieRequestHandler(ServerConfiguration conf, RequestProcessor processor, io.netty.channel.group.ChannelGroup allChannels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
void
channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
io.netty.channel.ChannelHandlerContext
ctx()
void
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause)
void
flushPendingResponse()
void
prepareSendResponseV2(int rc, BookieProtocol.ParsedAddRequest req)
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
BookieRequestHandler
BookieRequestHandler(ServerConfiguration conf, RequestProcessor processor, io.netty.channel.group.ChannelGroup allChannels)
-
-
Method Detail
-
ctx
public io.netty.channel.ChannelHandlerContext ctx()
-
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
-
channelRegistered
public void channelRegistered(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception
- Specified by:
channelRegistered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRegistered
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
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause) throws java.lang.Exception
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
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
-
prepareSendResponseV2
public void prepareSendResponseV2(int rc, BookieProtocol.ParsedAddRequest req)
-
flushPendingResponse
public void flushPendingResponse()
-
-