Package io.vertx.rxjava3.core.http
Class HttpClientConnection
- java.lang.Object
-
- io.vertx.rxjava3.core.http.HttpConnection
-
- io.vertx.rxjava3.core.http.HttpClientConnection
-
- All Implemented Interfaces:
HttpClient
public class HttpClientConnection extends HttpConnection implements HttpClient
Represents an HTTP client connection.You can use this connection to create requests to the connected server.
Depending on the nature of the connection, requests might just be sent to the server or might be queued until a connection request is available.
NOTE: This class has been automatically generated from the
original
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<HttpClientConnection>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description HttpClientConnection(HttpClientConnection delegate)
HttpClientConnection(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
activeStreams()
Completable
close()
Close immediately (shutdown(0, TimeUnit.SECONDS
).boolean
equals(Object o)
HttpClientConnection
getDelegate()
int
hashCode()
long
maxActiveStreams()
static HttpClientConnection
newInstance(HttpClientConnection arg)
Single<HttpClientRequest>
request()
Create an HTTP request to send to the server with the default host and port of the client.Single<HttpClientRequest>
request(HttpMethod method, int port, String host, String requestURI)
Create an HTTP request to send to the server at thehost
andport
.Single<HttpClientRequest>
request(HttpMethod method, String requestURI)
Create an HTTP request to send to the server at the default host and port.Single<HttpClientRequest>
request(HttpMethod method, String host, String requestURI)
Create an HTTP request to send to the server at thehost
and default port.Single<HttpClientRequest>
request(RequestOptions options)
Create an HTTP request to send to the server.Completable
rxClose()
Close immediately (shutdown(0, TimeUnit.SECONDS
).Single<HttpClientRequest>
rxRequest()
Create an HTTP request to send to the server with the default host and port of the client.Single<HttpClientRequest>
rxRequest(HttpMethod method, int port, String host, String requestURI)
Create an HTTP request to send to the server at thehost
andport
.Single<HttpClientRequest>
rxRequest(HttpMethod method, String requestURI)
Create an HTTP request to send to the server at the default host and port.Single<HttpClientRequest>
rxRequest(HttpMethod method, String host, String requestURI)
Create an HTTP request to send to the server at thehost
and default port.Single<HttpClientRequest>
rxRequest(RequestOptions options)
Create an HTTP request to send to the server.Completable
rxShutdown()
Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)
).Completable
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 atimeout
the connection will be closed.Completable
shutdown()
Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)
).Completable
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 atimeout
the connection will be closed.String
toString()
-
Methods inherited from class io.vertx.rxjava3.core.http.HttpConnection
closeHandler, exceptionHandler, getWindowSize, goAway, goAway, goAway, goAwayHandler, indicatedServerName, isSsl, localAddress, localAddress, newInstance, ping, pingHandler, remoteAddress, remoteAddress, remoteSettings, remoteSettingsHandler, rxPing, rxUpdateSettings, settings, setWindowSize, shutdownHandler, sslSession, updateSettings
-
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<HttpClientConnection> __TYPE_ARG
-
-
Constructor Detail
-
HttpClientConnection
public HttpClientConnection(HttpClientConnection delegate)
-
HttpClientConnection
public HttpClientConnection(Object delegate)
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toString
in classHttpConnection
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classHttpConnection
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classHttpConnection
-
getDelegate
public HttpClientConnection getDelegate()
- Specified by:
getDelegate
in interfaceHttpClient
- Overrides:
getDelegate
in classHttpConnection
-
request
public Single<HttpClientRequest> request()
Create an HTTP request to send to the server with the default host and port of the client.- Specified by:
request
in interfaceHttpClient
- Returns:
- a future notified when the request is ready to be sent
-
rxRequest
public Single<HttpClientRequest> rxRequest()
Create an HTTP request to send to the server with the default host and port of the client.- Specified by:
rxRequest
in interfaceHttpClient
- Returns:
- a future notified when the request is ready to be sent
-
request
public Single<HttpClientRequest> request(RequestOptions options)
Create an HTTP request to send to the server.- Specified by:
request
in interfaceHttpClient
- Parameters:
options
- the request options- Returns:
- a future notified when the request is ready to be sent
-
rxRequest
public Single<HttpClientRequest> rxRequest(RequestOptions options)
Create an HTTP request to send to the server.- Specified by:
rxRequest
in interfaceHttpClient
- Parameters:
options
- the request options- Returns:
- a future notified when the request is ready to be sent
-
request
public Single<HttpClientRequest> request(HttpMethod method, int port, String host, String requestURI)
Create an HTTP request to send to the server at thehost
andport
.- Specified by:
request
in interfaceHttpClient
- Parameters:
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URI- Returns:
- a future notified when the request is ready to be sent
-
rxRequest
public Single<HttpClientRequest> rxRequest(HttpMethod method, int port, String host, String requestURI)
Create an HTTP request to send to the server at thehost
andport
.- Specified by:
rxRequest
in interfaceHttpClient
- Parameters:
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URI- Returns:
- a future notified when the request is ready to be sent
-
request
public Single<HttpClientRequest> request(HttpMethod method, String host, String requestURI)
Create an HTTP request to send to the server at thehost
and default port.- Specified by:
request
in interfaceHttpClient
- Parameters:
method
- the HTTP methodhost
- the hostrequestURI
- the relative URI- Returns:
- a future notified when the request is ready to be sent
-
rxRequest
public Single<HttpClientRequest> rxRequest(HttpMethod method, String host, String requestURI)
Create an HTTP request to send to the server at thehost
and default port.- Specified by:
rxRequest
in interfaceHttpClient
- Parameters:
method
- the HTTP methodhost
- the hostrequestURI
- the relative URI- Returns:
- a future notified when the request is ready to be sent
-
request
public Single<HttpClientRequest> request(HttpMethod method, String requestURI)
Create an HTTP request to send to the server at the default host and port.- Specified by:
request
in interfaceHttpClient
- Parameters:
method
- the HTTP methodrequestURI
- the relative URI- Returns:
- a future notified when the request is ready to be sent
-
rxRequest
public Single<HttpClientRequest> rxRequest(HttpMethod method, String requestURI)
Create an HTTP request to send to the server at the default host and port.- Specified by:
rxRequest
in interfaceHttpClient
- Parameters:
method
- the HTTP methodrequestURI
- the relative URI- Returns:
- a future notified when the request is ready to be sent
-
activeStreams
public long activeStreams()
- Returns:
- the number of active request/response (streams)
-
maxActiveStreams
public long maxActiveStreams()
- Returns:
- the max number of concurrent active streams this connection can handle
-
shutdown
public Completable shutdown()
Description copied from class:HttpConnection
Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)
).- Specified by:
shutdown
in interfaceHttpClient
- Overrides:
shutdown
in classHttpConnection
- Returns:
- a future completed when shutdown has completed
-
rxShutdown
public Completable rxShutdown()
Description copied from class:HttpConnection
Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)
).- Specified by:
rxShutdown
in interfaceHttpClient
- Overrides:
rxShutdown
in classHttpConnection
- Returns:
- a future completed when shutdown has completed
-
shutdown
public Completable shutdown(long timeout, TimeUnit unit)
Description copied from class:HttpConnection
Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests are processed, otherwise after atimeout
the connection will be closed. Client connection are immediately removed from the pool.- HTTP/2 connections will send a go away frame immediately to signal the other side the connection will close.
- HTTP/1.x connection will be closed.
- Specified by:
shutdown
in interfaceHttpClient
- Overrides:
shutdown
in classHttpConnection
- Parameters:
timeout
- the amount of time after which all resources are forcibly closedunit
- the of the timeout- Returns:
- a future completed when shutdown has completed
-
rxShutdown
public Completable rxShutdown(long timeout, TimeUnit unit)
Description copied from class:HttpConnection
Initiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests are processed, otherwise after atimeout
the connection will be closed. Client connection are immediately removed from the pool.- HTTP/2 connections will send a go away frame immediately to signal the other side the connection will close.
- HTTP/1.x connection will be closed.
- Specified by:
rxShutdown
in interfaceHttpClient
- Overrides:
rxShutdown
in classHttpConnection
- Parameters:
timeout
- the amount of time after which all resources are forcibly closedunit
- the of the timeout- Returns:
- a future completed when shutdown has completed
-
close
public Completable close()
Description copied from class:HttpConnection
Close immediately (shutdown(0, TimeUnit.SECONDS
).- Specified by:
close
in interfaceHttpClient
- Overrides:
close
in classHttpConnection
- Returns:
- a future notified when the client is closed
-
rxClose
public Completable rxClose()
Description copied from class:HttpConnection
Close immediately (shutdown(0, TimeUnit.SECONDS
).- Specified by:
rxClose
in interfaceHttpClient
- Overrides:
rxClose
in classHttpConnection
- Returns:
- a future notified when the client is closed
-
newInstance
public static HttpClientConnection newInstance(HttpClientConnection arg)
-
-