new ConnectionChannelRegistrationHandler(_serverContainer.getTcpChannelGroup()));
if (Logger.getRootLogger().isTraceEnabled())
{
pipeline.addLast("netty server traffic",
new LoggingHandler("netty server traffic", InternalLogLevel.DEBUG, true));
}
pipeline.addLast("outbound statistics collector",
new OutboundContainerStatisticsCollectingHandler(
_serverContainer.getContainerStatsCollector()));
ExtendedWriteTimeoutHandler writeTimeoutHandler =
new ExtendedWriteTimeoutHandler("server container " + _serverContainer.getContainerStaticConfig().getId(),
_serverContainer.getNetworkTimeoutTimer(),
_serverContainer.getContainerStaticConfig().getWriteTimeoutMs(),
true);
ExtendedReadTimeoutHandler readTimeoutHandler =
new ExtendedReadTimeoutHandler("server container " + _serverContainer.getContainerStaticConfig().getId(),
_serverContainer.getNetworkTimeoutTimer(),
_serverContainer.getContainerStaticConfig().getReadTimeoutMs(),
true);
pipeline.addLast("read timeout", readTimeoutHandler);
//add a handler to deal with write timeouts
pipeline.addLast("server container write timeout handler", writeTimeoutHandler);
pipeline.addLast("decoder",
new SimpleBinaryDatabusRequestDecoder(_serverContainer.getCommandsRegistry(),
readTimeoutHandler,
_byteOrder));
pipeline.addLast("encoder", new SimpleBinaryDatabusResponseEncoder());
// Fix for DDSDBUS-1000
// pipeline.addLast("executionHandler", _serverContainer.getNettyExecHandler());
//Dummy handler that will be automatically replaced depending on the current command being
//executed
pipeline.addLast(SimpleBinaryDatabusRequestDecoder.REQUEST_EXEC_HANDLER_NAME,
new LoggingHandler("netty server traffic", InternalLogLevel.DEBUG, true));
return pipeline;
}