List of usage examples for io.netty.handler.codec.http FullHttpResponse copy
@Override
FullHttpResponse copy();
From source file:org.ballerinalang.test.util.http2.HTTP2ResponseHandler.java
License:Open Source License
@Override protected void channelRead0(ChannelHandlerContext ctx, FullHttpResponse msg) throws Exception { Integer streamId = msg.headers().getInt(HttpConversionUtil.ExtensionHeaderNames.STREAM_ID.text()); if (streamId == null) { log.error("HTTP2ResponseHandler unexpected message received: " + msg); return;//from w w w .j a va 2s .com } Entry<ChannelFuture, ChannelPromise> entry = streamIdPromiseMap.get(streamId); if (entry == null) { if (streamId == 1) { log.error("HTTP2 Upgrade request has received from stream : " + streamId); } } else { streamIdResponseMap.put(streamId, msg.copy()); entry.getValue().setSuccess(); } }