@UnstableApi
public final class CleartextHttp2ServerUpgradeHandler
extends io.netty.handler.codec.ByteToMessageDecoder
Modifier and Type | Class and Description |
---|---|
static class |
CleartextHttp2ServerUpgradeHandler.PriorKnowledgeUpgradeEvent
User event that is fired to notify about HTTP/2 protocol is started.
|
Constructor and Description |
---|
CleartextHttp2ServerUpgradeHandler(io.netty.handler.codec.http.HttpServerCodec httpServerCodec,
io.netty.handler.codec.http.HttpServerUpgradeHandler httpServerUpgradeHandler,
io.netty.channel.ChannelHandler http2ServerHandler)
Creates the channel handler provide cleartext HTTP/2 upgrade from HTTP
upgrade or prior knowledge
|
Modifier and Type | Method and Description |
---|---|
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
List<Object> out)
Peek inbound message to determine current connection wants to start HTTP/2
by HTTP upgrade or prior knowledge
|
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
public CleartextHttp2ServerUpgradeHandler(io.netty.handler.codec.http.HttpServerCodec httpServerCodec, io.netty.handler.codec.http.HttpServerUpgradeHandler httpServerUpgradeHandler, io.netty.channel.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(io.netty.channel.ChannelHandlerContext ctx) throws Exception
handlerAdded
in interface io.netty.channel.ChannelHandler
handlerAdded
in class io.netty.channel.ChannelHandlerAdapter
Exception
protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, List<Object> out) throws Exception
decode
in class io.netty.handler.codec.ByteToMessageDecoder
Exception
Copyright © 2008–2021 The Netty Project. All rights reserved.