Top Fields Constructors Methods
io.vertx.core.http.impl

public Class VertxHttp2ClientUpgradeCodec

extends Object
implements UpgradeCodec
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec
Imports
io.netty.buffer.ByteBuf, io.netty.channel.ChannelHandlerContext, io.netty.handler.codec.http.FullHttpResponse, .HttpClientUpgradeHandler, .HttpRequest, io.netty.handler.codec.http2.Http2Settings, io.netty.util.collection.CharObjectMap, io.vertx.core.buffer.Buffer, java.util.Collection, .Collections, .List

Author
Julien Viet

Field Summary

Modifier and TypeField and Description
private final Http2Settings
private static final List<CharSequence>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public CharSequence
protocol()

Implements io.netty.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec.protocol.

Returns the name of the protocol supported by this codec, as indicated by the 'UPGRADE' header.

public Collection<CharSequence>
setUpgradeHeaders(ChannelHandlerContext ctx, HttpRequest upgradeRequest)

Implements io.netty.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec.setUpgradeHeaders.

Sets any protocol-specific headers required to the upgrade request.

public void
upgradeTo(ChannelHandlerContext
the context for the current handler.
ctx
,
FullHttpResponse
the 101 Switching Protocols response that indicates that the server has switched to this protocol.
upgradeResponse
)

Implements io.netty.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec.upgradeTo.

Performs an HTTP protocol upgrade from the source codec.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

settingsback to summary
private final Http2Settings settings
UPGRADE_HEADERSback to summary
private static final List<CharSequence> UPGRADE_HEADERS

Constructor Detail

VertxHttp2ClientUpgradeCodecback to summary
public VertxHttp2ClientUpgradeCodec(Http2Settings settings)

Method Detail

protocolback to summary
public CharSequence protocol()

Implements io.netty.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec.protocol.

Doc from io.netty.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec.protocol.

Returns the name of the protocol supported by this codec, as indicated by the 'UPGRADE' header.

Annotations
@Override
setUpgradeHeadersback to summary
public Collection<CharSequence> setUpgradeHeaders(ChannelHandlerContext ctx, HttpRequest upgradeRequest)

Implements io.netty.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec.setUpgradeHeaders.

Doc from io.netty.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec.setUpgradeHeaders.

Sets any protocol-specific headers required to the upgrade request. Returns the names of all headers that were added. These headers will be used to populate the CONNECTION header.

Annotations
@Override
upgradeToback to summary
public void upgradeTo(ChannelHandlerContext ctx, FullHttpResponse upgradeResponse) throws Exception

Implements io.netty.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec.upgradeTo.

Doc from io.netty.handler.codec.http.HttpClientUpgradeHandler.UpgradeCodec.upgradeTo.

Performs an HTTP protocol upgrade from the source codec. This method is responsible for adding all handlers required for the new protocol.

Parameters
ctx:ChannelHandlerContext

the context for the current handler.

upgradeResponse:FullHttpResponse

the 101 Switching Protocols response that indicates that the server has switched to this protocol.

Annotations
@Override