private void configureHttp2UpgradePipeline ( ChannelPipeline pipeline , HttpClientCodec sourceCodec , TargetHandler targetHandler ) { pipeline . addLast ( sourceCodec ) ; addCommonHandlers ( pipeline ) ; Http2ClientUpgradeCodec upgradeCodec = new Http2ClientUpgradeCodec ( http2ConnectionHandler ) ; HttpClientUpgradeHandler upgradeHandler = new HttpClientUpgradeHandler ( sourceCodec , upgradeCodec , Integer . MAX_VALUE ) ; pipeline . addLast ( Constants . HTTP2_UPGRADE_HANDLER , upgradeHandler ) ; pipeline . addLast ( Constants . TARGET_HANDLER , targetHandler ) ; }
Creates the pipeline for handing http2 upgrade .