public class HttpConnection extends Object
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
closeHandler(io.vertx.core.Handler<java.lang.Void>)
exceptionHandler(io.vertx.core.Handler<java.lang.Throwable>)
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<HttpConnection> |
__TYPE_ARG |
Constructor and Description |
---|
HttpConnection(HttpConnection delegate) |
HttpConnection(Object delegate) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection and all the currently active streams.
|
void |
close(Handler<AsyncResult<Void>> handler)
Close the connection and all the currently active streams.
|
HttpConnection |
closeHandler(Handler<Void> handler)
Set a close handler.
|
boolean |
equals(Object o) |
HttpConnection |
exceptionHandler(Handler<Throwable> handler)
Set an handler called when a connection error happens
|
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(Handler<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() |
SocketAddress |
localAddress(boolean real)
|
static HttpConnection |
newInstance(HttpConnection arg) |
HttpConnection |
ping(Buffer data)
Send a frame to the remote endpoint.
|
HttpConnection |
ping(Buffer data,
Handler<AsyncResult<Buffer>> pongHandler)
Send a frame to the remote endpoint.
|
HttpConnection |
pingHandler(Handler<Buffer> handler)
Set an handler notified when a frame is received from the remote endpoint.
|
SocketAddress |
remoteAddress() |
SocketAddress |
remoteAddress(boolean real)
|
Http2Settings |
remoteSettings() |
HttpConnection |
remoteSettingsHandler(Handler<Http2Settings> handler)
Set an handler that is called when remote endpoint
Http2Settings are updated. |
Single<Void> |
rxClose()
Close the connection and all the currently active streams.
|
Single<Buffer> |
rxPing(Buffer data)
Send a frame to the remote endpoint.
|
Single<Void> |
rxShutdown()
Shutdown a 30 seconds timeout (
shutdown(30, TimeUnit.SECONDS) ). |
Single<Void> |
rxShutdown(long timeout)
Deprecated.
|
Single<Void> |
rxShutdown(long timeout,
TimeUnit unit)
Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests
are processed, otherwise after a
timeout the connection will be closed. |
Single<Void> |
rxUpdateSettings(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. |
Http2Settings |
settings() |
HttpConnection |
setWindowSize(int windowSize)
Update the current connection wide window size to a new size.
|
void |
shutdown()
Shutdown a 30 seconds timeout (
shutdown(30, TimeUnit.SECONDS) ). |
void |
shutdown(Handler<AsyncResult<Void>> handler)
Shutdown a 30 seconds timeout (
shutdown(30, TimeUnit.SECONDS) ). |
void |
shutdown(long timeout)
Deprecated.
|
void |
shutdown(long timeout,
Handler<AsyncResult<Void>> handler)
Deprecated.
|
void |
shutdown(long timeout,
TimeUnit unit)
Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests
are processed, otherwise after a
timeout the connection will be closed. |
void |
shutdown(long timeout,
TimeUnit unit,
Handler<AsyncResult<Void>> handler)
Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests
are processed, otherwise after a
timeout the connection will be closed. |
HttpConnection |
shutdownHandler(Handler<Void> handler)
Set an handler called when a frame has been sent or received and all connections are closed.
|
SSLSession |
sslSession() |
String |
toString() |
HttpConnection |
updateSettings(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. |
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. |
public static final io.vertx.lang.rx.TypeArg<HttpConnection> __TYPE_ARG
public HttpConnection(HttpConnection delegate)
public HttpConnection(Object delegate)
public 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 debugData
lastStreamId
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(Handler<GoAway> handler)
handler
- the handlerpublic HttpConnection shutdownHandler(Handler<Void> handler)
handler
- the handlerpublic void shutdown(Handler<AsyncResult<Void>> handler)
shutdown(30, TimeUnit.SECONDS)
).handler
- public void shutdown()
shutdown(30, TimeUnit.SECONDS)
).public Single<Void> rxShutdown()
shutdown(30, TimeUnit.SECONDS)
).@Deprecated public void shutdown(long timeout, Handler<AsyncResult<Void>> handler)
shutdown(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
, in milliseconds.timeout
- handler
- @Deprecated public void shutdown(long timeout)
shutdown(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
, in milliseconds.timeout
- @Deprecated public Single<Void> rxShutdown(long timeout)
shutdown(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
, in milliseconds.timeout
- public void shutdown(long timeout, TimeUnit unit, Handler<AsyncResult<Void>> handler)
timeout
the connection will be closed. Client connection are immediately removed
from the pool.
timeout
- the amount of time after which all resources are forcibly closedunit
- the of the timeouthandler
- the handler notified with the resultpublic void shutdown(long timeout, TimeUnit unit)
timeout
the connection will be closed. Client connection are immediately removed
from the pool.
timeout
- the amount of time after which all resources are forcibly closedunit
- the of the timeoutpublic Single<Void> rxShutdown(long timeout, TimeUnit unit)
timeout
the connection will be closed. Client connection are immediately removed
from the pool.
timeout
- the amount of time after which all resources are forcibly closedunit
- the of the timeoutpublic HttpConnection closeHandler(Handler<Void> handler)
handler
- the handler to be notifiedpublic void close(Handler<AsyncResult<Void>> handler)
handler
- the handler to be completed when the connection is closedpublic void close()
public Single<Void> rxClose()
public Http2Settings settings()
public HttpConnection updateSettings(Http2Settings settings, Handler<AsyncResult<Void>> completionHandler)
completionHandler
will be notified when the remote endpoint has acknowledged the settings.
This is not implemented for HTTP/1.x.settings
- the new settingscompletionHandler
- the handler notified when the settings have been acknowledged by the remote endpointpublic HttpConnection updateSettings(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 Single<Void> rxUpdateSettings(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 Http2Settings remoteSettings()
public HttpConnection remoteSettingsHandler(Handler<Http2Settings> handler)
Http2Settings
are updated.
This is not implemented for HTTP/1.x.handler
- the handler for remote endpoint settingspublic HttpConnection ping(Buffer data, Handler<AsyncResult<Buffer>> pongHandler)
data
- the 8 bytes data of the framepongHandler
- an async result handler notified with pong reply or the failurepublic HttpConnection ping(Buffer data)
data
- the 8 bytes data of the framepublic Single<Buffer> rxPing(Buffer data)
data
- the 8 bytes data of the framepublic HttpConnection pingHandler(Handler<Buffer> handler)
handler
- the handler to be called when a is receivedpublic HttpConnection exceptionHandler(Handler<Throwable> handler)
handler
- the handlerpublic SocketAddress remoteAddress()
null
(e.g a server bound on a domain socket). If useProxyProtocol
is set to true
, the address returned will be of the actual connecting client.public SocketAddress remoteAddress(boolean real)
real
- public SocketAddress localAddress()
null
(e.g a server bound on a domain socket) If useProxyProtocol
is set to true
, the address returned will be of the proxy.public SocketAddress localAddress(boolean real)
real
- public boolean isSsl()
HttpConnection
is encrypted via SSL/TLS.public String indicatedServerName()
public SSLSession sslSession()
public static HttpConnection newInstance(HttpConnection arg)
Copyright © 2024 Eclipse. All rights reserved.