public class Http2SettingsHandler extends SimpleChannelInboundHandler<Http2Settings>
Http2Settings
object and notifies a ChannelPromise
ChannelHandler.Sharable
构造器和说明 |
---|
Http2SettingsHandler(ChannelPromise promise)
Create new instance
|
限定符和类型 | 方法和说明 |
---|---|
void |
awaitSettings(long timeout,
java.util.concurrent.TimeUnit unit)
Wait for this handler to be added after the upgrade to HTTP/2, and for initial preface
handshake to complete.
|
protected void |
channelRead0(ChannelHandlerContext ctx,
Http2Settings msg)
Is called for each message of type
I . |
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 Http2SettingsHandler(ChannelPromise promise)
promise
- Promise object used to notify when first settings are receivedpublic void awaitSettings(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.Exception
timeout
- Time to waitunit
- TimeUnit
for timeout
java.lang.Exception
- if timeout or other failure occursprotected void channelRead0(ChannelHandlerContext ctx, Http2Settings msg) throws java.lang.Exception
SimpleChannelInboundHandler
I
.channelRead0
在类中 SimpleChannelInboundHandler<Http2Settings>
ctx
- the ChannelHandlerContext
which this SimpleChannelInboundHandler
belongs tomsg
- the message to handlejava.lang.Exception
- is thrown if an error occurred