Package io.vertx.reactivex.core.http
Class HttpClientConnection
- java.lang.Object
-
- io.vertx.reactivex.core.http.HttpConnection
-
- io.vertx.reactivex.core.http.HttpClientConnection
-
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate,HttpClient
public class HttpClientConnection extends HttpConnection implements io.vertx.lang.rx.RxDelegate, 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
originalnon 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 longactiveStreams()Future<Void>close()Close immediately (shutdown(0, TimeUnit.SECONDS).booleanequals(Object o)HttpClientConnectiongetDelegate()inthashCode()longmaxActiveStreams()static HttpClientConnectionnewInstance(HttpClientConnection arg)Future<HttpClientRequest>request()Create an HTTP request to send to the server with the default host and port of the client.Future<HttpClientRequest>request(HttpMethod method, int port, String host, String requestURI)Create an HTTP request to send to the server at thehostandport.Future<HttpClientRequest>request(HttpMethod method, String requestURI)Create an HTTP request to send to the server at the default host and port.Future<HttpClientRequest>request(HttpMethod method, String host, String requestURI)Create an HTTP request to send to the server at thehostand default port.Future<HttpClientRequest>request(RequestOptions options)Create an HTTP request to send to the server.CompletablerxClose()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 thehostandport.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 thehostand default port.Single<HttpClientRequest>rxRequest(RequestOptions options)Create an HTTP request to send to the server.CompletablerxShutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).CompletablerxShutdown(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 atimeoutthe connection will be closed.Future<Void>shutdown()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).Future<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 atimeoutthe connection will be closed.StringtoString()-
Methods inherited from class io.vertx.reactivex.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:
toStringin classHttpConnection
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classHttpConnection
-
hashCode
public int hashCode()
- Overrides:
hashCodein classHttpConnection
-
getDelegate
public HttpClientConnection getDelegate()
- Specified by:
getDelegatein interfaceHttpClient- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate- Overrides:
getDelegatein classHttpConnection
-
request
public Future<HttpClientRequest> 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
public Single<HttpClientRequest> 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
public Future<HttpClientRequest> request(RequestOptions options)
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
public Single<HttpClientRequest> rxRequest(RequestOptions options)
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
public Future<HttpClientRequest> request(HttpMethod method, String host, String requestURI)
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
public Single<HttpClientRequest> rxRequest(HttpMethod method, String host, String requestURI)
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
public Future<HttpClientRequest> request(HttpMethod method, String requestURI)
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
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:
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
public Future<Void> 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
public Completable 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
public Future<Void> shutdown(long timeout, TimeUnit unit)
Description copied from class:HttpConnectionInitiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests are processed, otherwise after atimeoutthe 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:
shutdownin interfaceHttpClient- Overrides:
shutdownin 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:HttpConnectionInitiate a graceful connection shutdown, the connection is taken out of service and closed when all the inflight requests are processed, otherwise after atimeoutthe 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:
rxShutdownin interfaceHttpClient- Overrides:
rxShutdownin 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 Future<Void> 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
public Completable 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
-
newInstance
public static HttpClientConnection newInstance(HttpClientConnection arg)
-
-