Class Vertx5HttpClientFactory

  • All Implemented Interfaces:
    HttpClient.Factory

    public class Vertx5HttpClientFactory
    extends Object
    implements HttpClient.Factory
    Vert.x 5 implementation of HttpClient.Factory.

    When constructed with a non‑null Vertx the same instance is reused for every client; otherwise each newBuilder() call will lazily create (and own) its own Vert.x runtime.

    Important: This HTTP client requires Vert.x 5.x runtime classes. It is mutually exclusive with kubernetes-httpclient-vertx (Vert.x 4.x). Including both on the classpath will cause runtime errors due to incompatible Vert.x API versions. Ensure your project excludes one or the other.

    • Constructor Detail

      • Vertx5HttpClientFactory

        public Vertx5HttpClientFactory()
        Return a factory that reuses the supplied Vert.x instance.
      • Vertx5HttpClientFactory

        public Vertx5HttpClientFactory​(io.vertx.core.Vertx vertx)
        Create a new instance of the factory that will reuse the provided Vertx instance.

        It's the user's responsibility to manage the lifecycle of the provided Vert.x instance. Operations such as close, and so on are left on hands of the user.

        Parameters:
        vertx - the Vertx instance to use.
    • Method Detail

      • additionalConfig

        protected void additionalConfig​(io.vertx.ext.web.client.WebClientOptions webClientOptions,
                                        io.vertx.core.http.WebSocketClientOptions wsOptions,
                                        io.vertx.core.http.PoolOptions poolOptions)
        Additional configuration to be applied to the options after the Config has been processed.
        Parameters:
        webClientOptions - the HTTP client options
        wsOptions - the WebSocket client options
        poolOptions - the connection pool options