class HttpAdapter extends ChannelInboundHandlerAdapter implements Handler {

        private Http2ConnectionHandler handler;
        private int maxContentLength = 1024 * 1024 * 64;

        public HttpAdapter(Http2ConnectionHandler handler) {
            super();
            this.handler = handler;
        }

        @Override
        public AsciiString scheme() {
            return AsciiString.of("http");
        }

        public int getMaxContentLength() {
            return maxContentLength;
        }

        public void setMaxContentLength(int maxContentLength) {
            this.maxContentLength = maxContentLength;
        }

        @Override
        public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {<FILL_FUNCTION_BODY>}
    }

            // TODO graceful validation
            ByteBuf bf = ((ByteBuf) msg).copy();
            Http2Validator validator = new Http2Validator();
            validator.channelRead(null, bf);
            if (validator.isHttp2()) {
                ctx.pipeline().replace(this, null, handler);
            } else {
                ctx.pipeline().addLast("http-decoder", new HttpRequestDecoder());
                ctx.pipeline().addLast("http-aggregator", new HttpObjectAggregator(maxContentLength));
                ctx.pipeline().addLast("http-encoder", new HttpResponseEncoder());
                ctx.pipeline().addLast("http-chunked", new ChunkedWriteHandler());
                ctx.pipeline().addLast("serverHandler", httpHandler);
            }
            ctx.fireChannelRead(msg);
        
<no_super_class>