public class HttpResponseHandler extends SimpleChannelInboundHandler<FullHttpResponse>
FullHttpResponse translated from HTTP/2 framesChannelHandler.Sharable| 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 |
channelRead0(ChannelHandlerContext ctx,
FullHttpResponse msg)
Please keep in mind that this method will be renamed to
messageReceived(ChannelHandlerContext, I) in 5.0. |
Map.Entry<ChannelFuture,ChannelPromise> |
put(int streamId,
ChannelFuture writeFuture,
ChannelPromise promise)
Create an association between an anticipated response stream id and a
ChannelPromise |
acceptInboundMessage, channelReadchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAdded, handlerRemovedpublic Map.Entry<ChannelFuture,ChannelPromise> put(int streamId, ChannelFuture writeFuture, ChannelPromise promise)
ChannelPromisestreamId - The stream for which a response is expectedwriteFuture - A future that represent the request write operationpromise - The promise object that will be used to wait/notify eventsstreamIdawaitResponses(long, java.util.concurrent.TimeUnit)public void awaitResponses(long timeout,
TimeUnit unit)
timeout - Value of time to wait for each responseunit - Units associated with timeoutput(int, io.netty.channel.ChannelFuture, io.netty.channel.ChannelPromise)protected void channelRead0(ChannelHandlerContext ctx, FullHttpResponse msg) throws Exception
SimpleChannelInboundHandlermessageReceived(ChannelHandlerContext, I) in 5.0.
Is called for each message of type I.channelRead0 in class SimpleChannelInboundHandler<FullHttpResponse>ctx - the ChannelHandlerContext which this SimpleChannelInboundHandler
belongs tomsg - the message to handleException - is thrown if an error occurredCopyright © 2008–2017 The Netty Project. All rights reserved.