final TcpServer<HttpRequest, HttpResponse> server
= new TcpServerSpec<HttpRequest, HttpResponse>(NettyTcpServer.class)
.env(env)
.listen(port)
.options(new NettyServerSocketOptions()
.pipelineConfigurer(new Consumer<ChannelPipeline>() {
@Override
public void accept(ChannelPipeline pipeline) {
pipeline.addLast(new HttpRequestDecoder());
pipeline.addLast(new HttpObjectAggregator(Integer.MAX_VALUE));