public class HttpResponseHandler extends SimpleChannelInboundHandler<FullHttpResponse>
FullHttpResponse translated from HTTP/2 framesChannelHandler.Sharable| 构造器和说明 |
|---|
HttpResponseHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
awaitResponses(long timeout,
java.util.concurrent.TimeUnit unit)
Wait (sequentially) for a time duration for each anticipated response
|
protected void |
channelRead0(ChannelHandlerContext ctx,
FullHttpResponse msg)
Is called for each message of type
I. |
java.util.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 java.util.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,
java.util.concurrent.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 java.lang.Exception
SimpleChannelInboundHandlerI.channelRead0 在类中 SimpleChannelInboundHandler<FullHttpResponse>ctx - the ChannelHandlerContext which this SimpleChannelInboundHandler
belongs tomsg - the message to handlejava.lang.Exception - is thrown if an error occurred