public class Http2ClientUpgradeCodec extends Object implements HttpClientUpgradeHandler.UpgradeCodec
| Constructor and Description |
|---|
Http2ClientUpgradeCodec (Http2ConnectionHandler connectionHandler)
Creates the codec using a default name for the connection handler when adding to the
pipeline.
|
Http2ClientUpgradeCodec (Http2ConnectionHandler connectionHandler,
Http2MultiplexHandler http2MultiplexHandler)
Creates the codec using a default name for the connection handler when adding to the
pipeline.
|
Http2ClientUpgradeCodec (Http2FrameCodec frameCodec,
ChannelHandler upgradeToHandler) |
Http2ClientUpgradeCodec (String handlerName,
Http2ConnectionHandler connectionHandler)
Creates the codec providing an upgrade to the given handler for HTTP/2.
|
Http2ClientUpgradeCodec (String handlerName,
Http2ConnectionHandler connectionHandler,
Http2MultiplexHandler http2MultiplexHandler)
Creates the codec providing an upgrade to the given handler for HTTP/2.
|
Http2ClientUpgradeCodec (String handlerName,
Http2FrameCodec frameCodec,
ChannelHandler upgradeToHandler) |
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
protocol ()
Returns the name of the protocol supported by this codec, as indicated by the
'UPGRADE' header. |
Collection<CharSequence> |
setUpgradeHeaders (ChannelHandlerContext ctx,
HttpRequest upgradeRequest)
Sets any protocol-specific headers required to the upgrade request.
|
void |
upgradeTo (ChannelHandlerContext ctx,
FullHttpResponse upgradeResponse)
Performs an HTTP protocol upgrade from the source codec.
|
public Http2ClientUpgradeCodec(Http2FrameCodec frameCodec, ChannelHandler upgradeToHandler)
public Http2ClientUpgradeCodec(String handlerName, Http2FrameCodec frameCodec, ChannelHandler upgradeToHandler)
public Http2ClientUpgradeCodec(Http2ConnectionHandler connectionHandler)
connectionHandler - the HTTP/2 connection handlerpublic Http2ClientUpgradeCodec(Http2ConnectionHandler connectionHandler, Http2MultiplexHandler http2MultiplexHandler)
connectionHandler - the HTTP/2 connection handlerhttp2MultiplexHandler - the Http2 Multiplexer handler to work with Http2FrameCodecpublic Http2ClientUpgradeCodec(String handlerName, Http2ConnectionHandler connectionHandler)
handlerName - the name of the HTTP/2 connection handler to be used in the pipeline,
or null to auto-generate the nameconnectionHandler - the HTTP/2 connection handlerpublic Http2ClientUpgradeCodec(String handlerName, Http2ConnectionHandler connectionHandler, Http2MultiplexHandler http2MultiplexHandler)
handlerName - the name of the HTTP/2 connection handler to be used in the pipeline,
or null to auto-generate the nameconnectionHandler - the HTTP/2 connection handlerpublic CharSequence protocol()
HttpClientUpgradeHandler.UpgradeCodec 'UPGRADE' header.protocol in interface HttpClientUpgradeHandler.UpgradeCodec public Collection<CharSequence> setUpgradeHeaders(ChannelHandlerContext ctx, HttpRequest upgradeRequest)
HttpClientUpgradeHandler.UpgradeCodec setUpgradeHeaders in interface HttpClientUpgradeHandler.UpgradeCodec public void upgradeTo(ChannelHandlerContext ctx, FullHttpResponse upgradeResponse) throws Exception
HttpClientUpgradeHandler.UpgradeCodec upgradeTo in interface HttpClientUpgradeHandler.UpgradeCodec ctx - the context for the current handler.upgradeResponse - the 101 Switching Protocols response that indicates that the server
has switched to this protocol.Exception Copyright © 2008–2025 The Netty Project. All rights reserved.