Class HttpClientConnection
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate, HttpClient
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 -
Constructor Summary
ConstructorsConstructorDescriptionHttpClientConnection(HttpClientConnection delegate) HttpClientConnection(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionlongclose()Close immediately (shutdown(0, TimeUnit.SECONDS).booleaninthashCode()longstatic HttpClientConnectionrequest()Create an HTTP request to send to the server with the default host and port of the client.request(HttpMethod method, int port, String host, String requestURI) Create an HTTP request to send to the server at thehostandport.request(HttpMethod method, String requestURI) Create an HTTP request to send to the server at the default host and port.request(HttpMethod method, String host, String requestURI) Create an HTTP request to send to the server at thehostand default port.request(RequestOptions options) Create an HTTP request to send to the server.rxClose()Close immediately (shutdown(0, TimeUnit.SECONDS).Create an HTTP request to send to the server with the default host and port of the client.rxRequest(HttpMethod method, int port, String host, String requestURI) Create an HTTP request to send to the server at thehostandport.rxRequest(HttpMethod method, String requestURI) Create an HTTP request to send to the server at the default host and port.rxRequest(HttpMethod method, String host, String requestURI) Create an HTTP request to send to the server at thehostand default port.rxRequest(RequestOptions options) Create an HTTP request to send to the server.Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).rxShutdown(long timeout, TimeUnit unit) rxShutdown(Duration timeout) Initiate the client shutdown sequence.shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Initiate the client shutdown sequence.toString()Methods inherited from class HttpConnection
closeHandler, exceptionHandler, getWindowSize, goAway, goAway, goAway, goAwayHandler, indicatedServerName, isSsl, localAddress, localAddress, newInstance, ping, pingHandler, protocolVersion, remoteAddress, remoteAddress, remoteSettings, remoteSettingsHandler, rxPing, rxUpdateSettings, settings, setWindowSize, shutdownHandler, sslSession, updateSettings
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
HttpClientConnection
-
HttpClientConnection
-
-
Method Details
-
toString
- Overrides:
toStringin classHttpConnection
-
equals
- Overrides:
equalsin classHttpConnection
-
hashCode
public int hashCode()- Overrides:
hashCodein classHttpConnection
-
getDelegate
- Specified by:
getDelegatein interfaceHttpClient- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate- Overrides:
getDelegatein classHttpConnection
-
request
Create an HTTP request to send to the server with the default host and port of the client.- Specified by:
requestin interfaceHttpClient- Returns:
- a future notified when the request is ready to be sent
-
rxRequest
Create an HTTP request to send to the server with the default host and port of the client.- Specified by:
rxRequestin interfaceHttpClient- Returns:
- a future notified when the request is ready to be sent
-
request
Create an HTTP request to send to the server.- Specified by:
requestin interfaceHttpClient- Parameters:
options- the request options- Returns:
- a future notified when the request is ready to be sent
-
rxRequest
Create an HTTP request to send to the server.- Specified by:
rxRequestin interfaceHttpClient- Parameters:
options- the request options- Returns:
- a future notified when the request is ready to be sent
-
request
public Future<HttpClientRequest> request(HttpMethod method, int port, String host, String requestURI) Create an HTTP request to send to the server at thehostandport.- Specified by:
requestin 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 thehostandport.- Specified by:
rxRequestin 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
Create an HTTP request to send to the server at thehostand default port.- Specified by:
requestin interfaceHttpClient- Parameters:
method- the HTTP methodhost- the hostrequestURI- the relative URI- Returns:
- a future notified when the request is ready to be sent
-
rxRequest
Create an HTTP request to send to the server at thehostand default port.- Specified by:
rxRequestin interfaceHttpClient- Parameters:
method- the HTTP methodhost- the hostrequestURI- the relative URI- Returns:
- a future notified when the request is ready to be sent
-
request
Create an HTTP request to send to the server at the default host and port.- Specified by:
requestin interfaceHttpClient- Parameters:
method- the HTTP methodrequestURI- the relative URI- Returns:
- a future notified when the request is ready to be sent
-
rxRequest
Create an HTTP request to send to the server at the default host and port.- Specified by:
rxRequestin 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
Description copied from class:HttpConnectionShutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).- Specified by:
shutdownin interfaceHttpClient- Overrides:
shutdownin classHttpConnection- Returns:
- a future completed when shutdown has completed
-
rxShutdown
Description copied from class:HttpConnectionShutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).- Specified by:
rxShutdownin interfaceHttpClient- Overrides:
rxShutdownin classHttpConnection- Returns:
- a future completed when shutdown has completed
-
shutdown
Description copied from class:HttpConnection- Specified by:
shutdownin interfaceHttpClient- Overrides:
shutdownin classHttpConnection- Parameters:
timeout-unit-- Returns:
-
rxShutdown
Description copied from class:HttpConnection- Specified by:
rxShutdownin interfaceHttpClient- Overrides:
rxShutdownin classHttpConnection- Parameters:
timeout-unit-- Returns:
-
close
Description copied from class:HttpConnectionClose immediately (shutdown(0, TimeUnit.SECONDS).- Specified by:
closein interfaceHttpClient- Overrides:
closein classHttpConnection- Returns:
- a future notified when the client is closed
-
rxClose
Description copied from class:HttpConnectionClose immediately (shutdown(0, TimeUnit.SECONDS).- Specified by:
rxClosein interfaceHttpClient- Overrides:
rxClosein classHttpConnection- Returns:
- a future notified when the client is closed
-
shutdown
Initiate the client shutdown sequence.Connections are taken out of service and closed when all inflight requests are processed, client connection are immediately removed from the pool. When all connections are closed the client is closed. When the
timeoutexpires, all unclosed connections are immediately closed.- HTTP/2 connections will send a go away frame immediately to signal the other side the connection will close
- HTTP/1.x client connection will be closed after the current response is received
- Overrides:
shutdownin classHttpConnection- Parameters:
timeout- the amount of time after which all resources are forcibly closed- Returns:
- a future notified when the client is closed
-
rxShutdown
Initiate the client shutdown sequence.Connections are taken out of service and closed when all inflight requests are processed, client connection are immediately removed from the pool. When all connections are closed the client is closed. When the
timeoutexpires, all unclosed connections are immediately closed.- HTTP/2 connections will send a go away frame immediately to signal the other side the connection will close
- HTTP/1.x client connection will be closed after the current response is received
- Overrides:
rxShutdownin classHttpConnection- Parameters:
timeout- the amount of time after which all resources are forcibly closed- Returns:
- a future notified when the client is closed
-
newInstance
-