public class HttpResponseHandler
extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpResponse>
FullHttpResponse translated from HTTP/2 frames| Constructor and Description |
|---|
HttpResponseHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitResponses(long timeout,
TimeUnit unit)
Wait (sequentially) for a time duration for each anticipated response
|
protected void |
messageReceived(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpResponse msg) |
io.netty.channel.ChannelPromise |
put(int streamId,
io.netty.channel.ChannelPromise promise)
Create an association between an anticipated response stream id and a
ChannelPromise |
acceptInboundMessage, channelReadbind, channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, handlerAdded, handlerRemoved, isSharable, read, userEventTriggered, writepublic io.netty.channel.ChannelPromise put(int streamId,
io.netty.channel.ChannelPromise promise)
ChannelPromisestreamId - The stream for which a response is expectedpromise - The promise object that will be used to wait/notify eventsstreamIdawaitResponses(long, TimeUnit)public void awaitResponses(long timeout,
TimeUnit unit)
timeout - Value of time to wait for each responseunit - Units associated with timeoutput(int, ChannelPromise)protected void messageReceived(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.FullHttpResponse msg)
throws Exception
messageReceived in class io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpResponse>ExceptionCopyright © 2008–2015 The Netty Project. All rights reserved.