@ChannelHandler.Sharable
public class GlobalHandler
extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
ChannelPipeline
.
Full HTTP response may have following error codes:
200 if it processed request successfully.
204 if request has no content.
400 if there is a IllegalArgumentException
.
500 if there is an internal error.Constructor and Description |
---|
GlobalHandler(HandlerFactory handlerFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpRequest request) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
acceptInboundMessage, channelRead
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
handlerAdded, handlerRemoved, isSharable
public GlobalHandler(HandlerFactory handlerFactory)
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest request) throws Exception
channelRead0
in class io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
Copyright © 2017. All rights reserved.