public static void notifyRequestListener ( Http2SourceHandler http2SourceHandler , HttpCarbonMessage httpRequestMsg , int streamId ) { if ( http2SourceHandler . getServerConnectorFuture ( ) != null ) { try { ServerConnectorFuture outboundRespFuture = httpRequestMsg . getHttpResponseFuture ( ) ; outboundRespFuture . setHttpConnectorListener ( new Http2OutboundRespListener ( http2SourceHandler . getServerChannelInitializer ( ) , httpRequestMsg , http2SourceHandler . getChannelHandlerContext ( ) , http2SourceHandler . getConnection ( ) , http2SourceHandler . getEncoder ( ) , streamId , http2SourceHandler . getServerName ( ) , http2SourceHandler . getRemoteAddress ( ) ) ) ; http2SourceHandler . getServerConnectorFuture ( ) . notifyHttpListener ( httpRequestMsg ) ; } catch ( Exception e ) { LOG . error ( "Error while notifying listeners" , e ) ; } } else { LOG . error ( "Cannot find registered listener to forward the message" ) ; } }
Notifies the registered listeners which listen for the incoming carbon messages .