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, channelRead
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded, handlerRemoved
public java.util.Map.Entry<ChannelFuture,ChannelPromise> put(int streamId, ChannelFuture writeFuture, ChannelPromise promise)
ChannelPromise
streamId
- 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 eventsstreamId
awaitResponses(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 timeout
put(int, io.netty.channel.ChannelFuture, io.netty.channel.ChannelPromise)
protected void channelRead0(ChannelHandlerContext ctx, FullHttpResponse msg) throws java.lang.Exception
SimpleChannelInboundHandler
I
.channelRead0
在类中 SimpleChannelInboundHandler<FullHttpResponse>
ctx
- the ChannelHandlerContext
which this SimpleChannelInboundHandler
belongs tomsg
- the message to handlejava.lang.Exception
- is thrown if an error occurred