new NioServerSocketChannelFactory(
Executors.newCachedThreadPool(),
Executors.newCachedThreadPool()));
// Set up the pipeline factory.
bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
public ChannelPipeline getPipeline() throws Exception {
ChannelPipeline pipeline = pipeline();
pipeline.addLast("timeout", new IdleStateHandler(timer, 0, 0, 20));
pipeline.addLast("nabaliveServerHandler", nabaliveServerHandler);
return pipeline;