// Configure the server.
ServerBootstrap sb = new ServerBootstrap(
new DefaultLocalServerChannelFactory());
// Set up the default server-side event pipeline.
EchoServerHandler handler = new EchoServerHandler();
sb.getPipeline().addLast("handler", handler);
// Start up the server.
sb.bind(socketAddress);