@Override
public void initChannel(SocketChannel ch) throws Exception {
ch.pipeline().addLast(new MongoWireEncoder());
ch.pipeline().addLast(new MongoWireProtocolHandler());
ch.pipeline().addLast(new MongoDatabaseHandler(backend, channelGroup));
ch.pipeline().addLast(new MongoExceptionHandler());
}
});
channel = bootstrap.bind().syncUninterruptibly().channel();