Class VertxClientHttpEngine

java.lang.Object
dev.resteasy.vertx.client.VertxClientHttpEngine
All Implemented Interfaces:
org.jboss.resteasy.client.jaxrs.ClientHttpEngine, org.jboss.resteasy.client.jaxrs.engines.AsyncClientHttpEngine

public class VertxClientHttpEngine extends Object implements org.jboss.resteasy.client.jaxrs.engines.AsyncClientHttpEngine
A RESTEasy HTTP client engine implementation backed by Vert.x HTTP client.

This engine provides asynchronous HTTP request execution using Vert.x's event-driven architecture. Request bodies are streamed using chunked transfer encoding when no explicit Content-Length is provided, preventing excessive memory consumption for large payloads.

The engine can be configured with a custom Vertx instance, HttpClientOptions, and ClientBuilderConfiguration. If no Vertx instance is provided, a default one will be created and managed by this engine.

Author:
James R. Perkins
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.jboss.resteasy.client.jaxrs.engines.AsyncClientHttpEngine

    org.jboss.resteasy.client.jaxrs.engines.AsyncClientHttpEngine.ResultExtractor<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new engine.
    VertxClientHttpEngine(io.vertx.core.http.HttpClientOptions options)
    Creates a new engine with the specified HTTP client options.
    VertxClientHttpEngine(io.vertx.core.http.HttpClientOptions options, org.jboss.resteasy.client.jaxrs.api.ClientBuilderConfiguration configuration)
    Creates a new engine with the specified HTTP client options and configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
     
     
    jakarta.ws.rs.core.Response
    invoke(jakarta.ws.rs.client.Invocation request)
     
    <T> Future<T>
    submit(org.jboss.resteasy.client.jaxrs.internal.ClientInvocation request, boolean buffered, jakarta.ws.rs.client.InvocationCallback<T> callback, org.jboss.resteasy.client.jaxrs.engines.AsyncClientHttpEngine.ResultExtractor<T> extractor)
     
    submit(org.jboss.resteasy.client.jaxrs.internal.ClientInvocation request, boolean buffered, org.jboss.resteasy.client.jaxrs.engines.AsyncClientHttpEngine.ResultExtractor<T> extractor, ExecutorService executorService)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.jboss.resteasy.client.jaxrs.engines.AsyncClientHttpEngine

    submit

    Methods inherited from interface org.jboss.resteasy.client.jaxrs.ClientHttpEngine

    isFollowRedirects, setFollowRedirects
  • Constructor Details

    • VertxClientHttpEngine

      public VertxClientHttpEngine()
      Creates a new engine.
    • VertxClientHttpEngine

      public VertxClientHttpEngine(io.vertx.core.http.HttpClientOptions options)
      Creates a new engine with the specified HTTP client options.
      Parameters:
      options - the HTTP client options
    • VertxClientHttpEngine

      public VertxClientHttpEngine(io.vertx.core.http.HttpClientOptions options, org.jboss.resteasy.client.jaxrs.api.ClientBuilderConfiguration configuration)
      Creates a new engine with the specified HTTP client options and configuration.
      Parameters:
      options - the HTTP client options
      configuration - the client builder configuration, may be null
  • Method Details

    • submit

      public <T> Future<T> submit(org.jboss.resteasy.client.jaxrs.internal.ClientInvocation request, boolean buffered, jakarta.ws.rs.client.InvocationCallback<T> callback, org.jboss.resteasy.client.jaxrs.engines.AsyncClientHttpEngine.ResultExtractor<T> extractor)
      Specified by:
      submit in interface org.jboss.resteasy.client.jaxrs.engines.AsyncClientHttpEngine
    • submit

      public <T> CompletableFuture<T> submit(org.jboss.resteasy.client.jaxrs.internal.ClientInvocation request, boolean buffered, org.jboss.resteasy.client.jaxrs.engines.AsyncClientHttpEngine.ResultExtractor<T> extractor, ExecutorService executorService)
      Specified by:
      submit in interface org.jboss.resteasy.client.jaxrs.engines.AsyncClientHttpEngine
    • getSslContext

      public SSLContext getSslContext()
      Specified by:
      getSslContext in interface org.jboss.resteasy.client.jaxrs.ClientHttpEngine
    • getHostnameVerifier

      public HostnameVerifier getHostnameVerifier()
      Specified by:
      getHostnameVerifier in interface org.jboss.resteasy.client.jaxrs.ClientHttpEngine
    • invoke

      public jakarta.ws.rs.core.Response invoke(jakarta.ws.rs.client.Invocation request)
      Specified by:
      invoke in interface org.jboss.resteasy.client.jaxrs.ClientHttpEngine
    • close

      public void close()
      Specified by:
      close in interface org.jboss.resteasy.client.jaxrs.ClientHttpEngine