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

public Class Http2UpgradeClientConnection

extends Object
implements HttpClientConnection
Class Inheritance
All Implemented Interfaces
io.vertx.core.http.impl.HttpClientConnection, io.vertx.core.http.HttpConnection
Imports
io.netty.buffer.ByteBuf, .ByteBufHolder, io.netty.channel.Channel, .ChannelHandlerContext, .ChannelInboundHandlerAdapter, .ChannelPipeline, io.netty.handler.codec.TooLongFrameException, io.netty.handler.codec.http.*, io.netty.util.ReferenceCountUtil, io.netty.util.concurrent.EventExecutor, io.vertx.codegen.annotations.Nullable, io.vertx.core.*, io.vertx.core.buffer.Buffer, io.vertx.core.http.*, .HttpVersion, io.vertx.core.impl.ContextInternal, io.vertx.core.impl.logging.Logger, .LoggerFactory, io.vertx.core.net.SocketAddress, io.vertx.core.streams.WriteStream, javax.net.ssl.SSLPeerUnverifiedException, .SSLSession, javax.security.cert.X509Certificate, java.security.cert.Certificate, java.util.ArrayDeque, .Deque, .List, java.util.concurrent.TimeUnit

A connection that attempts to perform a protocol upgrade to H2C. The connection might use HTTP/1 or H2C depending on the initial server response.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
Http2UpgradeClientConnection.UpgradingStream

The first stream that will send the request using HTTP/1, upgrades the connection when the protocol switches and receives the response with HTTP/2 frames.

Field Summary

Modifier and TypeField and Description
private HttpClientBase
private Handler<Void>
private Handler<Long>
private HttpClientConnection
private Handler<Void>
private Handler<Throwable>
private Handler<GoAway>
private static final Logger
private Handler<Buffer>
private Handler<Http2Settings>
private static final Object
private Handler<Void>
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public long
public Channel
public ChannelHandlerContext
public Future<Void>
close()

Implements io.vertx.core.http.HttpConnection.close.

Like close(Handler) but returns a Future of the asynchronous result

public HttpConnection
closeHandler(Handler<Void>
the handler to be notified
handler
)

Implements io.vertx.core.http.HttpConnection.closeHandler.

Set a close handler.

public long
public HttpClientConnection
concurrencyChangeHandler(Handler<Long>
the handler
handler
)

Implements io.vertx.core.http.impl.HttpClientConnection.concurrencyChangeHandler.

Set a handler called when the connection concurrency changes.

public Future<HttpClientRequest>
createRequest(ContextInternal
the stream context
context
)

Implements io.vertx.core.http.impl.HttpClientConnection.createRequest.

Create an HTTP stream.

public void
createStream(ContextInternal
the stream context
context
,
Handler<AsyncResult<HttpClientStream>>
the handler called when the stream is created
handler
)

Implements io.vertx.core.http.impl.HttpClientConnection.createStream.

Create an HTTP stream.

public HttpClientConnection
evictionHandler(Handler<Void>
the handler
handler
)

Implements io.vertx.core.http.impl.HttpClientConnection.evictionHandler.

Set a handler called when the connection should be evicted from a pool.

public HttpConnection
exceptionHandler(Handler<Throwable>
the handler
handler
)

Implements io.vertx.core.http.HttpConnection.exceptionHandler.

Set an handler called when a connection error happens

public ContextInternal
public HttpConnection
goAway(long
the GOAWAY error code
errorCode
,
int
the last stream id
lastStreamId
,
Buffer
additional debug data sent to the remote endpoint
debugData
)

Implements io.vertx.core.http.HttpConnection.goAway.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Send a go away frame to the remote endpoint of the connection.

public HttpConnection
public String
indicatedServerName()

Implements io.vertx.core.http.HttpConnection.indicatedServerName.

Returns the SNI server name presented during the SSL handshake by the client.

public boolean
public boolean
public long
public SocketAddress
public SocketAddress
localAddress(boolean real)

Implements io.vertx.core.http.HttpConnection.localAddress.

Like localAddress() ()} but returns the server local address when real is true

public Object
public X509Certificate[]
peerCertificateChain()

Implements io.vertx.core.http.HttpConnection.peerCertificateChain.

References Deprecated X509Certificate is deprecated or references (maybe indirectly) at least one deprecated element.

Note

Java SE 5+ recommends to use javax.net.ssl.SSLSession#getPeerCertificates() instead of of javax.net.ssl.SSLSession#getPeerCertificateChain() which this method is based on.

public List<Certificate>
public HttpConnection
ping(Buffer
the 8 bytes data of the frame
data
,
Handler<AsyncResult<Buffer>>
an async result handler notified with pong reply or the failure
pongHandler
)

Implements io.vertx.core.http.HttpConnection.ping.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Send a PING frame to the remote endpoint.

public Future<Buffer>
ping(Buffer data)

Implements io.vertx.core.http.HttpConnection.ping.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Same as ping(Buffer, Handler) but returns a Future of the asynchronous result

public HttpConnection
public SocketAddress
public SocketAddress
remoteAddress(boolean real)

Implements io.vertx.core.http.HttpConnection.remoteAddress.

Like remoteAddress() but returns the proxy remote address when real is true

public Http2Settings
public HttpConnection
remoteSettingsHandler(Handler<Http2Settings>
the handler for remote endpoint settings
handler
)

Implements io.vertx.core.http.HttpConnection.remoteSettingsHandler.

Set an handler that is called when remote endpoint Http2Settings are updated.

public Http2Settings
public Future<Void>
shutdown(long timeout, TimeUnit unit)

Implements io.vertx.core.http.HttpConnection.shutdown.

Like shutdown(long, TimeUnit, Handler) but returns a Future of the asynchronous result

public HttpConnection
public SSLSession
public HttpClientConnection
public Future<Void>
updateSettings(Http2Settings
the new settings
settings
)

Implements io.vertx.core.http.HttpConnection.updateSettings.

Send to the remote endpoint an update of the server settings.

public HttpConnection
updateSettings(Http2Settings
the new settings
settings
,
Handler<AsyncResult<Void>>
the handler notified when the settings have been acknowledged by the remote endpoint
completionHandler
)

Implements io.vertx.core.http.HttpConnection.updateSettings.

Send to the remote endpoint an update of this endpoint settings

The completionHandler will be notified when the remote endpoint has acknowledged the settings.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait