return threadingParameters;
}
protected Channel startServer() {
final ServerBootstrap bootstrap = new ServerBootstrap();
bootstrap.group(bossGroup, workerGroup)
.channel(NioServerSocketChannel.class)
.option(ChannelOption.SO_REUSEADDR, true);
// Set up the idle handler
IdleStateHandler idleStateHandler =
new IdleStateHandler(getReadIdleTime(), getWriteIdleTime(), 0);
// Set up the event pipeline factory.
servletPipeline =
new NettyHttpServletPipelineFactory(
tlsServerParameters, sessionSupport,
threadingParameters.getThreadPoolSize(),
maxChunkContentSize,
handlerMap, idleStateHandler);
// Start the servletPipeline's timer
servletPipeline.start();
bootstrap.childHandler(servletPipeline);
InetSocketAddress address = null;
if (host == null) {
address = new InetSocketAddress(port);
} else {
address = new InetSocketAddress(host, port);
}
// Bind and start to accept incoming connections.
try {
return bootstrap.bind(address).sync().channel();
} catch (InterruptedException ex) {
// do nothing here
return null;
}
}