@ChannelHandler.Sharable
public class RequestHandler
extends io.netty.channel.SimpleChannelInboundHandler
SimpleChannelInboundHandler
which handles the requests and dispatch them.
This class is ChannelHandler.Sharable
.Modifier and Type | Field and Description |
---|---|
protected RequestDispatcher |
dispatcher |
Constructor and Description |
---|
RequestHandler(RequestDispatcher dispatcher) |
Modifier and Type | Method and Description |
---|---|
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable e) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
acceptInboundMessage, channelRead
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
protected final RequestDispatcher dispatcher
public RequestHandler(RequestDispatcher dispatcher)
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
channelRead0
in class io.netty.channel.SimpleChannelInboundHandler
Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable e) throws Exception
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception
userEventTriggered
in interface io.netty.channel.ChannelInboundHandler
userEventTriggered
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
Copyright © 2018. All rights reserved.