Class HttpClientPool

java.lang.Object
io.quarkiverse.cxf.vertx.http.client.HttpClientPool

@ApplicationScoped public class HttpClientPool extends Object
A pool of HTTP clients so that we do not have to reconnect on every request.
  • Constructor Details

    • HttpClientPool

      @Inject public HttpClientPool(io.vertx.core.Vertx vertx)
  • Method Details

    • getClient

      public io.vertx.core.http.HttpClient getClient(HttpClientPool.ClientSpec spec)
      If this method returns a client that is concurrently being removed by onCertificateUpdate(CertificateUpdatedEvent) then the client may still work for one request, but will be re-created on the subsequent request.
      Parameters:
      spec - the caching key
      Returns:
      a possibly pooled client
    • onCertificateUpdate

      public void onCertificateUpdate(@Observes io.quarkus.tls.CertificateUpdatedEvent event)
      Called upon certificate reload. Clients having the given HttpClientPool.ClientSpec.tlsConfigurationName will be removed from this pool, so that they are created anew via getClient(ClientSpec) on the next request.
      Parameters:
      event - the update event
    • getVertx

      public io.vertx.core.Vertx getVertx()