public class HttpConnection extends Object
close()closeHandler(java.util.function.Consumer<java.lang.Void>)exceptionHandler(java.util.function.Consumer<java.lang.Throwable>)original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static TypeArg<HttpConnection> |
__TYPE_ARG |
| Constructor and Description |
|---|
HttpConnection(io.vertx.core.http.HttpConnection delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection and all the currently active streams.
|
HttpConnection |
closeHandler(Consumer<Void> handler)
Set a close handler.
|
boolean |
equals(Object o) |
HttpConnection |
exceptionHandler(Consumer<Throwable> handler)
Set an handler called when a connection error happens
|
io.vertx.core.http.HttpConnection |
getDelegate() |
int |
getWindowSize() |
HttpConnection |
goAway(long errorCode)
Like
goAway(long) with a last stream id -1 which means to disallow any new stream creation. |
HttpConnection |
goAway(long errorCode,
int lastStreamId)
Like
goAway(long) with no buffer. |
HttpConnection |
goAway(long errorCode,
int lastStreamId,
Buffer debugData)
Send a go away frame to the remote endpoint of the connection.
|
HttpConnection |
goAwayHandler(Consumer<io.vertx.core.http.GoAway> handler)
Set an handler called when a frame is received.
|
int |
hashCode() |
String |
indicatedServerName()
Returns the SNI server name presented during the SSL handshake by the client.
|
boolean |
isSsl() |
SocketAddress |
localAddress() |
static HttpConnection |
newInstance(io.vertx.core.http.HttpConnection arg) |
CompletionStage<Buffer> |
ping(Buffer data)
Send a frame to the remote endpoint.
|
HttpConnection |
pingHandler(Consumer<Buffer> handler)
Set an handler notified when a frame is received from the remote endpoint.
|
SocketAddress |
remoteAddress() |
io.vertx.core.http.Http2Settings |
remoteSettings() |
HttpConnection |
remoteSettingsHandler(Consumer<io.vertx.core.http.Http2Settings> handler)
Set an handler that is called when remote endpoint
Http2Settings are updated. |
io.vertx.core.http.Http2Settings |
settings() |
HttpConnection |
setWindowSize(int windowSize)
Update the current connection wide window size to a new size.
|
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(Consumer<Void> handler)
Set an handler called when a frame has been sent or received and all connections are closed.
|
SSLSession |
sslSession() |
String |
toString() |
CompletionStage<Void> |
updateSettings(io.vertx.core.http.Http2Settings settings)
Send to the remote endpoint an update of this endpoint settings
The
completionHandler will be notified when the remote endpoint has acknowledged the settings. |
public static final TypeArg<HttpConnection> __TYPE_ARG
public io.vertx.core.http.HttpConnection getDelegate()
public int getWindowSize()
-1 for HTTP/1.xpublic HttpConnection setWindowSize(int windowSize)
windowSize - the new window sizepublic HttpConnection goAway(long errorCode)
goAway(long) with a last stream id -1 which means to disallow any new stream creation.errorCode - public HttpConnection goAway(long errorCode, int lastStreamId)
goAway(long) with no buffer.errorCode - lastStreamId - public HttpConnection goAway(long errorCode, int lastStreamId, Buffer debugData)
errorCode and debugDatalastStreamId will be closed0 when all the remaining streams are closed this connection will be closed automaticallyerrorCode - the error codelastStreamId - the last stream iddebugData - additional debug data sent to the remote endpointpublic HttpConnection goAwayHandler(Consumer<io.vertx.core.http.GoAway> handler)
handler - the handlerpublic HttpConnection shutdownHandler(Consumer<Void> handler)
handler - the handlerpublic HttpConnection shutdown()
public HttpConnection shutdown(long timeoutMs)
timeout is fired.
This is not implemented for HTTP/1.x.timeoutMs - the timeout in millisecondspublic HttpConnection closeHandler(Consumer<Void> handler)
handler - the handler to be notifiedpublic void close()
public io.vertx.core.http.Http2Settings settings()
public CompletionStage<Void> updateSettings(io.vertx.core.http.Http2Settings settings)
completionHandler will be notified when the remote endpoint has acknowledged the settings.
This is not implemented for HTTP/1.x.settings - the new settingspublic io.vertx.core.http.Http2Settings remoteSettings()
public HttpConnection remoteSettingsHandler(Consumer<io.vertx.core.http.Http2Settings> handler)
Http2Settings are updated.
This is not implemented for HTTP/1.x.handler - the handler for remote endpoint settingspublic CompletionStage<Buffer> ping(Buffer data)
data - the 8 bytes data of the framepublic HttpConnection pingHandler(Consumer<Buffer> handler)
handler - the handler to be called when a is receivedpublic HttpConnection exceptionHandler(Consumer<Throwable> handler)
handler - the handlerpublic SocketAddress remoteAddress()
public SocketAddress localAddress()
public boolean isSsl()
HttpConnection is encrypted via SSL/TLS.public String indicatedServerName()
public SSLSession sslSession()
public static HttpConnection newInstance(io.vertx.core.http.HttpConnection arg)
Copyright © 2019 SmallRye. All rights reserved.