@UnstableApi public final class CleartextHttp2ServerUpgradeHandler extends ByteToMessageDecoder
限定符和类型 | 类和说明 |
---|---|
static class |
CleartextHttp2ServerUpgradeHandler.PriorKnowledgeUpgradeEvent
User event that is fired to notify about HTTP/2 protocol is started.
|
ByteToMessageDecoder.Cumulator
ChannelHandler.Sharable
COMPOSITE_CUMULATOR, MERGE_CUMULATOR
构造器和说明 |
---|
CleartextHttp2ServerUpgradeHandler(HttpServerCodec httpServerCodec,
HttpServerUpgradeHandler httpServerUpgradeHandler,
ChannelHandler http2ServerHandler)
Creates the channel handler provide cleartext HTTP/2 upgrade from HTTP
upgrade or prior knowledge
|
限定符和类型 | 方法和说明 |
---|---|
protected void |
decode(ChannelHandlerContext ctx,
ByteBuf in,
java.util.List<java.lang.Object> out)
Peek inbound message to determine current connection wants to start HTTP/2
by HTTP upgrade or prior knowledge
|
void |
handlerAdded(ChannelHandlerContext ctx)
Do nothing by default, sub-classes may override this method.
|
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
ensureNotSharable, isSharable
public CleartextHttp2ServerUpgradeHandler(HttpServerCodec httpServerCodec, HttpServerUpgradeHandler httpServerUpgradeHandler, ChannelHandler http2ServerHandler)
httpServerCodec
- the http server codechttpServerUpgradeHandler
- the http server upgrade handler for HTTP/2http2ServerHandler
- the http2 server handler, will be added into pipeline
when starting HTTP/2 by prior knowledgepublic void handlerAdded(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelHandlerAdapter
handlerAdded
在接口中 ChannelHandler
handlerAdded
在类中 ChannelHandlerAdapter
java.lang.Exception
protected void decode(ChannelHandlerContext ctx, ByteBuf in, java.util.List<java.lang.Object> out) throws java.lang.Exception
decode
在类中 ByteToMessageDecoder
ctx
- the ChannelHandlerContext
which this ByteToMessageDecoder
belongs toin
- the ByteBuf
from which to read dataout
- the List
to which decoded messages should be addedjava.lang.Exception
- is thrown if an error occurs