public class Http2UpgradedClientConnection extends Object implements HttpClientConnection
| Modifier and Type | Method and Description |
|---|---|
io.netty.channel.Channel |
channel() |
io.netty.channel.ChannelHandlerContext |
channelHandlerContext() |
void |
close()
Close the connection and all the currently active streams.
|
HttpConnection |
closeHandler(Handler<Void> handler)
Set a close handler.
|
void |
createStream(Handler<AsyncResult<io.vertx.core.http.impl.HttpClientStream>> handler) |
HttpConnection |
exceptionHandler(Handler<Throwable> handler)
Set an handler called when a connection error happens
|
ContextInternal |
getContext() |
HttpConnection |
goAway(long errorCode,
int lastStreamId,
Buffer debugData)
Send a go away frame to the remote endpoint of the connection.
|
HttpConnection |
goAwayHandler(Handler<GoAway> handler)
Set an handler called when a GOAWAY frame is received.
|
String |
indicatedServerName()
Returns the SNI server name presented during the SSL handshake by the client.
|
boolean |
isSsl() |
SocketAddress |
localAddress() |
Object |
metric() |
X509Certificate[] |
peerCertificateChain()
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.
|
HttpConnection |
ping(Buffer data,
Handler<AsyncResult<Buffer>> pongHandler)
Send a PING frame to the remote endpoint.
|
HttpConnection |
pingHandler(Handler<Buffer> handler)
Set an handler notified when a PING frame is received from the remote endpoint.
|
SocketAddress |
remoteAddress() |
Http2Settings |
remoteSettings() |
HttpConnection |
remoteSettingsHandler(Handler<Http2Settings> handler)
Set an handler that is called when remote endpoint
Http2Settings are updated. |
Http2Settings |
settings() |
HttpConnection |
shutdown()
Initiate a connection shutdown, a go away frame is sent and the connection is closed when all current active streams
are closed or after a time out of 30 seconds.
|
HttpConnection |
shutdown(long timeoutMs)
Initiate a connection shutdown, a go away frame is sent and the connection is closed when all current streams
will be closed or the
timeout is fired. |
HttpConnection |
shutdownHandler(Handler<Void> handler)
Set an handler called when a GOAWAY frame has been sent or received and all connections are closed.
|
SSLSession |
sslSession() |
HttpConnection |
updateSettings(Http2Settings settings)
Send to the remote endpoint an update of the server settings.
|
HttpConnection |
updateSettings(Http2Settings settings,
Handler<AsyncResult<Void>> completionHandler)
Send to the remote endpoint an update of this endpoint settings
The
completionHandler will be notified when the remote endpoint has acknowledged the settings. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWindowSize, goAway, goAway, setWindowSizepublic io.netty.channel.ChannelHandlerContext channelHandlerContext()
channelHandlerContext in interface HttpClientConnectionpublic io.netty.channel.Channel channel()
channel in interface HttpClientConnectionpublic void close()
HttpConnectionclose in interface HttpConnectionclose in interface HttpClientConnectionpublic Object metric()
metric in interface HttpClientConnectionpublic void createStream(Handler<AsyncResult<io.vertx.core.http.impl.HttpClientStream>> handler)
createStream in interface HttpClientConnectionpublic ContextInternal getContext()
getContext in interface HttpClientConnectionpublic HttpConnection closeHandler(Handler<Void> handler)
HttpConnectioncloseHandler in interface HttpConnectionhandler - the handler to be notifiedpublic HttpConnection exceptionHandler(Handler<Throwable> handler)
HttpConnectionexceptionHandler in interface HttpConnectionhandler - the handlerpublic HttpConnection remoteSettingsHandler(Handler<Http2Settings> handler)
HttpConnectionHttp2Settings are updated.
This is not implemented for HTTP/1.x.remoteSettingsHandler in interface HttpConnectionhandler - the handler for remote endpoint settingspublic HttpConnection pingHandler(Handler<Buffer> handler)
HttpConnectionpingHandler in interface HttpConnectionhandler - the handler to be called when a PING is receivedpublic HttpConnection goAwayHandler(Handler<GoAway> handler)
HttpConnectiongoAwayHandler in interface HttpConnectionhandler - the handlerpublic HttpConnection shutdownHandler(Handler<Void> handler)
HttpConnectionshutdownHandler in interface HttpConnectionhandler - the handlerpublic HttpConnection goAway(long errorCode, int lastStreamId, Buffer debugData)
HttpConnectionerrorCode and debugDatalastStreamId will be closed0 when all the remaining streams are closed this connection will be closed automaticallygoAway in interface HttpConnectionerrorCode - the GOAWAY error codelastStreamId - the last stream iddebugData - additional debug data sent to the remote endpointpublic HttpConnection shutdown()
HttpConnectionshutdown in interface HttpConnectionpublic HttpConnection shutdown(long timeoutMs)
HttpConnectiontimeout is fired.
This is not implemented for HTTP/1.x.shutdown in interface HttpConnectiontimeoutMs - the timeout in millisecondspublic HttpConnection updateSettings(Http2Settings settings)
HttpConnectionupdateSettings in interface HttpConnectionsettings - the new settingspublic HttpConnection updateSettings(Http2Settings settings, Handler<AsyncResult<Void>> completionHandler)
HttpConnectioncompletionHandler will be notified when the remote endpoint has acknowledged the settings.
This is not implemented for HTTP/1.x.updateSettings in interface HttpConnectionsettings - the new settingscompletionHandler - the handler notified when the settings have been acknowledged by the remote endpointpublic Http2Settings settings()
settings in interface HttpConnectionpublic Http2Settings remoteSettings()
remoteSettings in interface HttpConnectionpublic HttpConnection ping(Buffer data, Handler<AsyncResult<Buffer>> pongHandler)
HttpConnectionping in interface HttpConnectiondata - the 8 bytes data of the framepongHandler - an async result handler notified with pong reply or the failurepublic SocketAddress remoteAddress()
remoteAddress in interface HttpConnectionpublic SocketAddress localAddress()
localAddress in interface HttpConnectionpublic boolean isSsl()
isSsl in interface HttpConnectionHttpConnection is encrypted via SSL/TLS.public SSLSession sslSession()
sslSession in interface HttpConnectionSSLSessionpublic X509Certificate[] peerCertificateChain() throws SSLPeerUnverifiedException
HttpConnectionHttpConnection.sslSession() to
access that method.peerCertificateChain in interface HttpConnectionSSLPeerUnverifiedException - SSL peer's identity has not been verified.SSLSession.getPeerCertificateChain(),
HttpConnection.sslSession()public String indicatedServerName()
HttpConnectionindicatedServerName in interface HttpConnectionCopyright © 2020. All rights reserved.