* Configure the pipeline for a cleartext upgrade from HTTP to HTTP/2.
*/
private static void configureClearText(SocketChannel ch) {
HttpServerCodec sourceCodec = new HttpServerCodec();
HttpServerUpgradeHandler.UpgradeCodec upgradeCodec =
new Http2ServerUpgradeCodec(new HelloWorldHttp2Handler());
HttpServerUpgradeHandler upgradeHandler =
new HttpServerUpgradeHandler(sourceCodec, Collections.singletonList(upgradeCodec), 65536);
ch.pipeline().addLast(sourceCodec);
ch.pipeline().addLast(upgradeHandler);