Package io.vertx.mutiny.core.http
Class HttpClientBuilder
java.lang.Object
io.vertx.mutiny.core.http.HttpClientBuilder
- All Implemented Interfaces:
MutinyDelegate
A builder for
HttpClient.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Julien Viet
- See Also:
-
HttpClientBuilder
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpClientBuilder(io.vertx.core.http.HttpClientBuilder delegate) Create a new instance ofHttpClientBuilderdelegating to the given (non-null) instance ofHttpClientBuilder.HttpClientBuilder(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build and return the client.booleanio.vertx.core.http.HttpClientBuilderGet the delegate instance.inthashCode()static HttpClientBuildernewInstance(io.vertx.core.http.HttpClientBuilder delegate) Creates a new instance of theHttpClientBuilder.toString()with(io.vertx.core.http.HttpClientConfig config) Configure the client.with(io.vertx.core.http.HttpClientOptions options) Configure the client options.with(io.vertx.core.http.PoolOptions options) Configure the client with the given pooloptions.with(io.vertx.core.net.ClientSSLOptions options) Configure the client with the given SSLoptions.with(io.vertx.core.net.SSLEngineOptions engine) Configure the client with the given SSLengine.withAddressResolver(io.vertx.core.net.AddressResolver<?> resolver) Configure the client to use a specific address resolver.withConnectHandler(Consumer<HttpConnection> handler) Set a connection handler for the client.withLoadBalancer(io.vertx.core.net.endpoint.LoadBalancer loadBalancer) Configure the client to use a load balancer.withRedirectHandler(Function<HttpClientResponse, io.smallrye.mutiny.Uni<io.vertx.core.http.RequestOptions>> handler) Set a redirect handler for the http client.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
HttpClientBuilder
public HttpClientBuilder(io.vertx.core.http.HttpClientBuilder delegate) Create a new instance ofHttpClientBuilderdelegating to the given (non-null) instance ofHttpClientBuilder. -
HttpClientBuilder
-
-
Method Details
-
getDelegate
public io.vertx.core.http.HttpClientBuilder getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
with
Configure the client options.- Parameters:
options- the client options- Returns:
- a reference to this, so the API can be used fluently
-
with
Configure the client.- Parameters:
config- the client config- Returns:
- a reference to this, so the API can be used fluently
-
with
Configure the client with the given pooloptions.- Parameters:
options- the pool options- Returns:
- a reference to this, so the API can be used fluently
-
with
Configure the client with the given SSLoptions.- Parameters:
options- the SSL options- Returns:
- a reference to this, so the API can be used fluently
-
with
Configure the client with the given SSLengine.- Parameters:
engine- the SSL engine options- Returns:
- a reference to this, so the API can be used fluently
-
withConnectHandler
Set a connection handler for the client. This handler is called when a new connection is established.- Returns:
- a reference to this, so the API can be used fluently
-
withRedirectHandler
public HttpClientBuilder withRedirectHandler(Function<HttpClientResponse, io.smallrye.mutiny.Uni<io.vertx.core.http.RequestOptions>> handler) Set a redirect handler for the http client.The redirect handler is called when a
3xxresponse is received and the request is configured to follow redirects withHttpClientRequest.setFollowRedirects(boolean).The redirect handler is passed the
HttpClientResponse, it can return anHttpClientRequestornull.- when null is returned, the original response is processed by the original request response handler
- when a new
Future<HttpClientRequest>is returned, the client will send this new request
The handler must return a
Future<HttpClientRequest>unsent so the client can further configure it and send it.- Parameters:
handler- the new redirect handler- Returns:
- a reference to this, so the API can be used fluently
-
withAddressResolver
Configure the client to use a specific address resolver.- Parameters:
resolver- the address resolver
-
withLoadBalancer
Configure the client to use a load balancer.- Parameters:
loadBalancer- the load balancer
-
build
Build and return the client.- Returns:
- the client as configured by this builder
-
newInstance
Creates a new instance of theHttpClientBuilder. -
hashCode
public int hashCode() -
equals
-
toString
-