private static final Logger logger = LoggerFactory.getLogger(WebSocketChannelizer.class);
@Override
public void configure(final ChannelPipeline pipeline) {
if (logger.isDebugEnabled())
pipeline.addLast(new LoggingHandler("log-io", LogLevel.DEBUG));
logger.debug("HttpRequestDecoder settings - maxInitialLineLength={}, maxHeaderSize={}, maxChunkSize={}",
settings.maxInitialLineLength, settings.maxHeaderSize, settings.maxChunkSize);
pipeline.addLast("http-request-decoder", new HttpRequestDecoder(settings.maxInitialLineLength, settings.maxHeaderSize, settings.maxChunkSize));
if (logger.isDebugEnabled())
pipeline.addLast(new LoggingHandler("log-decoder-aggregator", LogLevel.DEBUG));
logger.debug("HttpObjectAggregator settings - maxContentLength={}, maxAccumulationBufferComponents={}",
settings.maxContentLength, settings.maxAccumulationBufferComponents);
final HttpObjectAggregator aggregator = new HttpObjectAggregator(settings.maxContentLength);
aggregator.setMaxCumulationBufferComponents(settings.maxAccumulationBufferComponents);
pipeline.addLast("aggregator", aggregator);
if (logger.isDebugEnabled())
pipeline.addLast(new LoggingHandler("log-aggregator-encoder", LogLevel.DEBUG));
pipeline.addLast("http-response-encoder", new HttpResponseEncoder());
pipeline.addLast("request-handler", new WebSocketServerProtocolHandler("/gremlin", null, false, settings.maxContentLength));
if (logger.isDebugEnabled())
pipeline.addLast(new LoggingHandler("log-aggregator-encoder", LogLevel.DEBUG));
pipeline.addLast("response-encoder", new WsGremlinResponseEncoder());
pipeline.addLast("request-text-decoder", new WsGremlinTextRequestDecoder());
pipeline.addLast("request-binary-decoder", new WsGremlinBinaryRequestDecoder(serializers));
if (logger.isDebugEnabled())
pipeline.addLast(new LoggingHandler("log-aggregator-encoder", LogLevel.DEBUG));
}