public class HttpServerChannelInitializer
extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
Constructor and Description |
---|
HttpServerChannelInitializer(ServerConfig serverConfig,
HandlerFactory handlerFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
initChannel(io.netty.channel.socket.SocketChannel ch)
Configure the channel pipeline with the following handler in order:
HttpServerCodec - decodes/encodes ByteBuf into/from HttpRequest and
HttpContent
HttpObjectAggregator - aggregates an HttpMessage and its following HttpContent s into a
single FullHttpRequest or FullHttpResponse .
GlobalHandler - handles request processing for all end points. |
channelRegistered, exceptionCaught, handlerAdded
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
public HttpServerChannelInitializer(ServerConfig serverConfig, HandlerFactory handlerFactory)
protected void initChannel(io.netty.channel.socket.SocketChannel ch) throws Exception
HttpServerCodec
- decodes/encodes ByteBuf
into/from HttpRequest
and
HttpContent
HttpObjectAggregator
- aggregates an HttpMessage
and its following HttpContent
s into a
single FullHttpRequest
or FullHttpResponse
.
GlobalHandler
- handles request processing for all end points.initChannel
in class io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
Exception
Copyright © 2017. All rights reserved.