/**
* Modifies the pipeline to handle HTTP requests
* @param ctx The calling channel handler context
* @param maxRequestSize The maximum request size in bytes
*/
private void switchToHttp(final ChannelHandlerContext ctx, final int maxRequestSize) {
ChannelPipeline p = ctx.pipeline();
p.addLast("httpHandler", new HttpServerCodec()); // TODO: config ?
p.addLast("decompressor", new HttpContentDecompressor());
p.addLast("aggregator", new HttpObjectAggregator(maxRequestSize));
p.addLast("jsonDecoder", new JsonObjectDecoder(maxRequestSize, false));
p.addLast("handler", jsonRpcHandler);
p.remove(this);
}
PipelineFactory.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:HeliosStreams
作者:
评论列表
文章目录