Package io.netty5.handler.codec.http2
Class Http2ClientUpgradeCodec
- java.lang.Object
-
- io.netty5.handler.codec.http2.Http2ClientUpgradeCodec
-
- All Implemented Interfaces:
io.netty5.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec
@UnstableApi public class Http2ClientUpgradeCodec extends Object implements io.netty5.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec
Client-side clear-text upgrade codec from HTTP to HTTP/2.
-
-
Constructor Summary
Constructors Constructor 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, io.netty5.channel.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, io.netty5.channel.ChannelHandler upgradeToHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharSequenceprotocol()Collection<CharSequence>setUpgradeHeaders(io.netty5.channel.ChannelHandlerContext ctx, io.netty5.handler.codec.http.HttpRequest upgradeRequest)voidupgradeTo(io.netty5.channel.ChannelHandlerContext ctx, io.netty5.util.Send<io.netty5.handler.codec.http.FullHttpResponse> upgradeResponse)
-
-
-
Constructor Detail
-
Http2ClientUpgradeCodec
public Http2ClientUpgradeCodec(Http2FrameCodec frameCodec, io.netty5.channel.ChannelHandler upgradeToHandler)
-
Http2ClientUpgradeCodec
public Http2ClientUpgradeCodec(String handlerName, Http2FrameCodec frameCodec, io.netty5.channel.ChannelHandler upgradeToHandler)
-
Http2ClientUpgradeCodec
public Http2ClientUpgradeCodec(Http2ConnectionHandler connectionHandler)
Creates the codec using a default name for the connection handler when adding to the pipeline.- Parameters:
connectionHandler- the HTTP/2 connection handler
-
Http2ClientUpgradeCodec
public Http2ClientUpgradeCodec(Http2ConnectionHandler connectionHandler, Http2MultiplexHandler http2MultiplexHandler)
Creates the codec using a default name for the connection handler when adding to the pipeline.- Parameters:
connectionHandler- the HTTP/2 connection handlerhttp2MultiplexHandler- the Http2 Multiplexer handler to work with Http2FrameCodec
-
Http2ClientUpgradeCodec
public Http2ClientUpgradeCodec(String handlerName, Http2ConnectionHandler connectionHandler)
Creates the codec providing an upgrade to the given handler for HTTP/2.- Parameters:
handlerName- the name of the HTTP/2 connection handler to be used in the pipeline, ornullto auto-generate the nameconnectionHandler- the HTTP/2 connection handler
-
Http2ClientUpgradeCodec
public Http2ClientUpgradeCodec(String handlerName, Http2ConnectionHandler connectionHandler, Http2MultiplexHandler http2MultiplexHandler)
Creates the codec providing an upgrade to the given handler for HTTP/2.- Parameters:
handlerName- the name of the HTTP/2 connection handler to be used in the pipeline, ornullto auto-generate the nameconnectionHandler- the HTTP/2 connection handler
-
-
Method Detail
-
protocol
public CharSequence protocol()
- Specified by:
protocolin interfaceio.netty5.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec
-
setUpgradeHeaders
public Collection<CharSequence> setUpgradeHeaders(io.netty5.channel.ChannelHandlerContext ctx, io.netty5.handler.codec.http.HttpRequest upgradeRequest)
- Specified by:
setUpgradeHeadersin interfaceio.netty5.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec
-
upgradeTo
public void upgradeTo(io.netty5.channel.ChannelHandlerContext ctx, io.netty5.util.Send<io.netty5.handler.codec.http.FullHttpResponse> upgradeResponse) throws Exception- Specified by:
upgradeToin interfaceio.netty5.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec- Throws:
Exception
-
-