public static void writeHttp2Headers ( ChannelHandlerContext ctx , OutboundMsgHolder outboundMsgHolder , Http2ClientChannel http2ClientChannel , Http2ConnectionEncoder encoder , int streamId , HttpHeaders headers , Http2Headers http2Headers , boolean endStream ) throws Http2Exception { int dependencyId = headers . getInt ( HttpConversionUtil . ExtensionHeaderNames . STREAM_DEPENDENCY_ID . text ( ) , 0 ) ; short weight = headers . getShort ( HttpConversionUtil . ExtensionHeaderNames . STREAM_WEIGHT . text ( ) , Http2CodecUtil . DEFAULT_PRIORITY_WEIGHT ) ; for ( Http2DataEventListener dataEventListener : http2ClientChannel . getDataEventListeners ( ) ) { if ( ! dataEventListener . onHeadersWrite ( ctx , streamId , http2Headers , endStream ) ) { return ; } } encoder . writeHeaders ( ctx , streamId , http2Headers , dependencyId , weight , false , 0 , endStream , ctx . newPromise ( ) ) ; encoder . flowController ( ) . writePendingBytes ( ) ; ctx . flush ( ) ; if ( endStream ) { outboundMsgHolder . setRequestWritten ( true ) ; } }
Writes HTTP2 headers .