Class HttpClient
- java.lang.Object
-
- io.vertx.mutiny.core.http.HttpClient
-
- All Implemented Interfaces:
Measured
public class HttpClient extends Object implements Measured
An asynchronous HTTP client.It allows you to make requests to HTTP servers, and a single client can make requests to any server.
This gives the benefits of keep alive when the client is loaded but means we don't keep connections hanging around unnecessarily when there would be no benefits anyway.
The client is designed to be reused between requests.
NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<HttpClient>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description HttpClient(io.vertx.core.http.HttpClient delegate)
HttpClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<Void>
close()
Close the client.Void
closeAndAwait()
Blocking variant ofclose()
.void
closeAndForget()
Variant ofclose()
that ignores the result of the operation.HttpClient
connectionHandler(Consumer<HttpConnection> handler)
Deprecated.instead useHttpClientBuilder#withConnectHandler(Handler)
boolean
equals(Object o)
io.vertx.core.http.HttpClient
getDelegate()
int
hashCode()
boolean
isMetricsEnabled()
static HttpClient
newInstance(io.vertx.core.http.HttpClient arg)
HttpClient
redirectHandler(Function<HttpClientResponse,io.smallrye.mutiny.Uni<io.vertx.core.http.RequestOptions>> handler)
Deprecated.instead useHttpClientBuilder.withRedirectHandler(Function)
io.smallrye.mutiny.Uni<HttpClientRequest>
request(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI)
Create an HTTP request to send to the server at thehost
andport
.io.smallrye.mutiny.Uni<HttpClientRequest>
request(io.vertx.core.http.HttpMethod method, String requestURI)
Create an HTTP request to send to the server at the default host and port.io.smallrye.mutiny.Uni<HttpClientRequest>
request(io.vertx.core.http.HttpMethod method, String host, String requestURI)
Create an HTTP request to send to the server at thehost
and default port.io.smallrye.mutiny.Uni<HttpClientRequest>
request(io.vertx.core.http.RequestOptions options)
Create an HTTP request to send to the server.HttpClientRequest
requestAndAwait(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI)
Blocking variant ofrequest(HttpMethod,int,String,String)
.HttpClientRequest
requestAndAwait(io.vertx.core.http.HttpMethod method, String requestURI)
Blocking variant ofrequest(HttpMethod,String)
.HttpClientRequest
requestAndAwait(io.vertx.core.http.HttpMethod method, String host, String requestURI)
Blocking variant ofrequest(HttpMethod,String,String)
.HttpClientRequest
requestAndAwait(io.vertx.core.http.RequestOptions options)
Blocking variant ofrequest(RequestOptions)
.void
requestAndForget(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI)
Variant ofrequest(HttpMethod,int,String,String)
that ignores the result of the operation.void
requestAndForget(io.vertx.core.http.HttpMethod method, String requestURI)
Variant ofrequest(HttpMethod,String)
that ignores the result of the operation.void
requestAndForget(io.vertx.core.http.HttpMethod method, String host, String requestURI)
Variant ofrequest(HttpMethod,String,String)
that ignores the result of the operation.void
requestAndForget(io.vertx.core.http.RequestOptions options)
Variant ofrequest(RequestOptions)
that ignores the result of the operation.String
toString()
io.smallrye.mutiny.Uni<Boolean>
updateSSLOptions(io.vertx.core.net.SSLOptions options)
LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)
but supplying a handler that will be called when the update happened (or has failed).io.smallrye.mutiny.Uni<Boolean>
updateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force)
LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)
but supplying a handler that will be called when the update happened (or has failed).Boolean
updateSSLOptionsAndAwait(io.vertx.core.net.SSLOptions options)
Blocking variant ofupdateSSLOptions(SSLOptions)
.Boolean
updateSSLOptionsAndAwait(io.vertx.core.net.SSLOptions options, boolean force)
Blocking variant ofupdateSSLOptions(SSLOptions,boolean)
.void
updateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options)
Variant ofupdateSSLOptions(SSLOptions)
that ignores the result of the operation.void
updateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options, boolean force)
Variant ofupdateSSLOptions(SSLOptions,boolean)
that ignores the result of the operation.io.smallrye.mutiny.Uni<WebSocket>
webSocket(int port, String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
io.smallrye.mutiny.Uni<WebSocket>
webSocket(io.vertx.core.http.WebSocketConnectOptions options)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
io.smallrye.mutiny.Uni<WebSocket>
webSocket(String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
io.smallrye.mutiny.Uni<WebSocket>
webSocket(String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
io.smallrye.mutiny.Uni<WebSocket>
webSocketAbs(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, List<String> subProtocols)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
WebSocket
webSocketAbsAndAwait(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, List<String> subProtocols)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
void
webSocketAbsAndForget(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, List<String> subProtocols)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
WebSocket
webSocketAndAwait(int port, String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
WebSocket
webSocketAndAwait(io.vertx.core.http.WebSocketConnectOptions options)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
WebSocket
webSocketAndAwait(String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
WebSocket
webSocketAndAwait(String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
void
webSocketAndForget(int port, String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
void
webSocketAndForget(io.vertx.core.http.WebSocketConnectOptions options)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
void
webSocketAndForget(String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
void
webSocketAndForget(String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<HttpClient> __TYPE_ARG
-
-
Constructor Detail
-
HttpClient
public HttpClient(io.vertx.core.http.HttpClient delegate)
-
HttpClient
public HttpClient(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.core.http.HttpClient getDelegate()
- Specified by:
getDelegate
in interfaceMeasured
-
isMetricsEnabled
public boolean isMetricsEnabled()
- Specified by:
isMetricsEnabled
in interfaceMeasured
- Returns:
true
if metrics are enabled
-
request
@CheckReturnValue public io.smallrye.mutiny.Uni<HttpClientRequest> request(io.vertx.core.http.RequestOptions options)
Create an HTTP request to send to the server. Thehandler
is called when the request is ready to be sent.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
options
- the request options- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
requestAndAwait
public HttpClientRequest requestAndAwait(io.vertx.core.http.RequestOptions options)
Blocking variant ofrequest(RequestOptions)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
options
- the request options- Returns:
- the HttpClientRequest instance produced by the operation.
-
requestAndForget
public void requestAndForget(io.vertx.core.http.RequestOptions options)
Variant ofrequest(RequestOptions)
that ignores the result of the operation.This method subscribes on the result of
request(RequestOptions)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromrequest(RequestOptions)
but you don't need to compose it with other operations.- Parameters:
options
- the request options
-
request
@CheckReturnValue public io.smallrye.mutiny.Uni<HttpClientRequest> request(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI)
Create an HTTP request to send to the server at thehost
andport
. Thehandler
is called when the request is ready to be sent.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URI- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
requestAndAwait
public HttpClientRequest requestAndAwait(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI)
Blocking variant ofrequest(HttpMethod,int,String,String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URI- Returns:
- the HttpClientRequest instance produced by the operation.
-
requestAndForget
public void requestAndForget(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI)
Variant ofrequest(HttpMethod,int,String,String)
that ignores the result of the operation.This method subscribes on the result of
request(HttpMethod,int,String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromrequest(HttpMethod,int,String,String)
but you don't need to compose it with other operations.- Parameters:
method
- the HTTP methodport
- the porthost
- the hostrequestURI
- the relative URI
-
request
@CheckReturnValue public io.smallrye.mutiny.Uni<HttpClientRequest> request(io.vertx.core.http.HttpMethod method, String host, String requestURI)
Create an HTTP request to send to the server at thehost
and default port. Thehandler
is called when the request is ready to be sent.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
method
- the HTTP methodhost
- the hostrequestURI
- the relative URI- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
requestAndAwait
public HttpClientRequest requestAndAwait(io.vertx.core.http.HttpMethod method, String host, String requestURI)
Blocking variant ofrequest(HttpMethod,String,String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
method
- the HTTP methodhost
- the hostrequestURI
- the relative URI- Returns:
- the HttpClientRequest instance produced by the operation.
-
requestAndForget
public void requestAndForget(io.vertx.core.http.HttpMethod method, String host, String requestURI)
Variant ofrequest(HttpMethod,String,String)
that ignores the result of the operation.This method subscribes on the result of
request(HttpMethod,String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromrequest(HttpMethod,String,String)
but you don't need to compose it with other operations.- Parameters:
method
- the HTTP methodhost
- the hostrequestURI
- the relative URI
-
request
@CheckReturnValue public io.smallrye.mutiny.Uni<HttpClientRequest> request(io.vertx.core.http.HttpMethod method, String requestURI)
Create an HTTP request to send to the server at the default host and port. Thehandler
is called when the request is ready to be sent.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
method
- the HTTP methodrequestURI
- the relative URI- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
requestAndAwait
public HttpClientRequest requestAndAwait(io.vertx.core.http.HttpMethod method, String requestURI)
Blocking variant ofrequest(HttpMethod,String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
method
- the HTTP methodrequestURI
- the relative URI- Returns:
- the HttpClientRequest instance produced by the operation.
-
requestAndForget
public void requestAndForget(io.vertx.core.http.HttpMethod method, String requestURI)
Variant ofrequest(HttpMethod,String)
that ignores the result of the operation.This method subscribes on the result of
request(HttpMethod,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromrequest(HttpMethod,String)
but you don't need to compose it with other operations.- Parameters:
method
- the HTTP methodrequestURI
- the relative URI
-
webSocket
@CheckReturnValue @Deprecated public io.smallrye.mutiny.Uni<WebSocket> webSocket(int port, String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
Connect a WebSocket to the specified port, host and relative request URIUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
port
- the porthost
- the hostrequestURI
- the relative URI- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
webSocketAndAwait
@Deprecated public WebSocket webSocketAndAwait(int port, String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
Blocking variant ofwebSocket(int,String,String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
port
- the porthost
- the hostrequestURI
- the relative URI- Returns:
- the WebSocket instance produced by the operation.
-
webSocketAndForget
@Deprecated public void webSocketAndForget(int port, String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
Variant ofwebSocket(int,String,String)
that ignores the result of the operation.This method subscribes on the result of
webSocket(int,String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromwebSocket(int,String,String)
but you don't need to compose it with other operations.- Parameters:
port
- the porthost
- the hostrequestURI
- the relative URI
-
webSocket
@CheckReturnValue @Deprecated public io.smallrye.mutiny.Uni<WebSocket> webSocket(String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
Connect a WebSocket to the host and relative request URI and default portUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
host
- the hostrequestURI
- the relative URI- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
webSocketAndAwait
@Deprecated public WebSocket webSocketAndAwait(String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
Blocking variant ofwebSocket(String,String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
host
- the hostrequestURI
- the relative URI- Returns:
- the WebSocket instance produced by the operation.
-
webSocketAndForget
@Deprecated public void webSocketAndForget(String host, String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
Variant ofwebSocket(String,String)
that ignores the result of the operation.This method subscribes on the result of
webSocket(String,String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromwebSocket(String,String)
but you don't need to compose it with other operations.- Parameters:
host
- the hostrequestURI
- the relative URI
-
webSocket
@CheckReturnValue @Deprecated public io.smallrye.mutiny.Uni<WebSocket> webSocket(String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
Connect a WebSocket at the relative request URI using the default host and portUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
requestURI
- the relative URI- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
webSocketAndAwait
@Deprecated public WebSocket webSocketAndAwait(String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
Blocking variant ofwebSocket(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
requestURI
- the relative URI- Returns:
- the WebSocket instance produced by the operation.
-
webSocketAndForget
@Deprecated public void webSocketAndForget(String requestURI)
Deprecated.instead useWebSocketClient#connect(int, String, String, Handler)
Variant ofwebSocket(String)
that ignores the result of the operation.This method subscribes on the result of
webSocket(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromwebSocket(String)
but you don't need to compose it with other operations.- Parameters:
requestURI
- the relative URI
-
webSocket
@CheckReturnValue @Deprecated public io.smallrye.mutiny.Uni<WebSocket> webSocket(io.vertx.core.http.WebSocketConnectOptions options)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
Connect a WebSocket with the specified options.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
options
- the request options- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
webSocketAndAwait
@Deprecated public WebSocket webSocketAndAwait(io.vertx.core.http.WebSocketConnectOptions options)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
Blocking variant ofwebSocket(WebSocketConnectOptions)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
options
- the request options- Returns:
- the WebSocket instance produced by the operation.
-
webSocketAndForget
@Deprecated public void webSocketAndForget(io.vertx.core.http.WebSocketConnectOptions options)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
Variant ofwebSocket(WebSocketConnectOptions)
that ignores the result of the operation.This method subscribes on the result of
webSocket(WebSocketConnectOptions)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromwebSocket(WebSocketConnectOptions)
but you don't need to compose it with other operations.- Parameters:
options
- the request options
-
webSocketAbs
@CheckReturnValue @Deprecated public io.smallrye.mutiny.Uni<WebSocket> webSocketAbs(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, List<String> subProtocols)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
Connect a WebSocket with the specified absolute url, with the specified headers, using the specified version of WebSockets, and the specified WebSocket sub protocols.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
url
- the absolute urlheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
webSocketAbsAndAwait
@Deprecated public WebSocket webSocketAbsAndAwait(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, List<String> subProtocols)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
Blocking variant ofwebSocketAbs(String,io.vertx.mutiny.core.MultiMap,WebsocketVersion,List)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
url
- the absolute urlheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use- Returns:
- the WebSocket instance produced by the operation.
-
webSocketAbsAndForget
@Deprecated public void webSocketAbsAndForget(String url, MultiMap headers, io.vertx.core.http.WebsocketVersion version, List<String> subProtocols)
Deprecated.instead useWebSocketClient#connect(WebSocketConnectOptions, Handler)
Variant ofwebSocketAbs(String,io.vertx.mutiny.core.MultiMap,WebsocketVersion,List)
that ignores the result of the operation.This method subscribes on the result of
webSocketAbs(String,io.vertx.mutiny.core.MultiMap,WebsocketVersion,List)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromwebSocketAbs(String,io.vertx.mutiny.core.MultiMap,WebsocketVersion,List)
but you don't need to compose it with other operations.- Parameters:
url
- the absolute urlheaders
- the headersversion
- the WebSocket versionsubProtocols
- the subprotocols to use
-
updateSSLOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.SSLOptions options)
LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)
but supplying a handler that will be called when the update happened (or has failed).Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
options
- the new SSL options- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
updateSSLOptionsAndAwait
public Boolean updateSSLOptionsAndAwait(io.vertx.core.net.SSLOptions options)
Blocking variant ofupdateSSLOptions(SSLOptions)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
options
- the new SSL options- Returns:
- the Boolean instance produced by the operation.
-
updateSSLOptionsAndForget
public void updateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options)
Variant ofupdateSSLOptions(SSLOptions)
that ignores the result of the operation.This method subscribes on the result of
updateSSLOptions(SSLOptions)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromupdateSSLOptions(SSLOptions)
but you don't need to compose it with other operations.- Parameters:
options
- the new SSL options
-
updateSSLOptions
@CheckReturnValue public io.smallrye.mutiny.Uni<Boolean> updateSSLOptions(io.vertx.core.net.SSLOptions options, boolean force)
LikeupdateSSLOptions(io.vertx.core.net.SSLOptions)
but supplying a handler that will be called when the update happened (or has failed).Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
options
- the new SSL optionsforce
- force the update when options are equals- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
updateSSLOptionsAndAwait
public Boolean updateSSLOptionsAndAwait(io.vertx.core.net.SSLOptions options, boolean force)
Blocking variant ofupdateSSLOptions(SSLOptions,boolean)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
options
- the new SSL optionsforce
- force the update when options are equals- Returns:
- the Boolean instance produced by the operation.
-
updateSSLOptionsAndForget
public void updateSSLOptionsAndForget(io.vertx.core.net.SSLOptions options, boolean force)
Variant ofupdateSSLOptions(SSLOptions,boolean)
that ignores the result of the operation.This method subscribes on the result of
updateSSLOptions(SSLOptions,boolean)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromupdateSSLOptions(SSLOptions,boolean)
but you don't need to compose it with other operations.- Parameters:
options
- the new SSL optionsforce
- force the update when options are equals
-
connectionHandler
@Deprecated public HttpClient connectionHandler(Consumer<HttpConnection> handler)
Deprecated.instead useHttpClientBuilder#withConnectHandler(Handler)
- Parameters:
handler
-- Returns:
-
redirectHandler
@Deprecated public HttpClient redirectHandler(Function<HttpClientResponse,io.smallrye.mutiny.Uni<io.vertx.core.http.RequestOptions>> handler)
Deprecated.instead useHttpClientBuilder.withRedirectHandler(Function)
- Parameters:
handler
- the new redirect handler- Returns:
- a reference to this, so the API can be used fluently
-
close
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> close()
Close the client. Closing will close down any pooled connections. Clients should always be closed after use.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
closeAndAwait
public Void closeAndAwait()
Blocking variant ofclose()
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
closeAndForget
public void closeAndForget()
-
newInstance
public static HttpClient newInstance(io.vertx.core.http.HttpClient arg)
-
-