@Override
public void configure(final ChannelPipeline pipeline) {
if (logger.isDebugEnabled())
pipeline.addLast(new LoggingHandler("log-io", LogLevel.DEBUG));
pipeline.addLast("http-server", new HttpServerCodec());
if (logger.isDebugEnabled())
pipeline.addLast(new LoggingHandler("http-io", LogLevel.DEBUG));
pipeline.addLast(new HttpObjectAggregator(settings.maxContentLength));
if (authenticator != null) {
// Cannot add the same handler instance to multiple times unless
// it is marked as @Sharable, indicating a race condition will
// not occur. It may not be a safe assumption that the handler
// is sharable so create a new handler each time.
authenticationHandler = authenticator.getClass() == AllowAllAuthenticator.class ?
null : new HttpBasicAuthenticationHandler(authenticator);
if (authenticationHandler != null)
pipeline.addLast(PIPELINE_AUTHENTICATOR, authenticationHandler);
}
pipeline.addLast("http-gremlin-handler", httpGremlinEndpointHandler);
}
HttpChannelizer.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:LiteGraph
作者:
评论列表
文章目录