Class JaxRsAdapterRestEasy

java.lang.Object
de.xima.fc.api.rest.pub.client.user_portal.JaxRsAdapterRestEasy
All Implemented Interfaces:
JaxRsAdapter

@Generated("de.xima.openapi.codegen.java_jaxrs.XimaJavaJaxrsGenerator") public class JaxRsAdapterRestEasy extends Object implements JaxRsAdapter
Adapter for the API client that integrates with a Jax RS implementation. You can extend this class and override methods you want to customize.
  • Field Details

    • objectMapperResolverFactory

      protected final Function<DateFormat, javax.ws.rs.ext.ContextResolver<com.fasterxml.jackson.databind.ObjectMapper>> objectMapperResolverFactory
    • tempFolderPath

      protected final String tempFolderPath
    • logging

      protected final boolean logging
    • buildClient

      protected final Function<? super org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder, ? extends javax.ws.rs.client.Client> buildClient
    • configClient

      protected final Consumer<? super org.jboss.resteasy.client.jaxrs.internal.ClientConfiguration> configClient
    • clientHttpEngine

      protected final org.jboss.resteasy.client.jaxrs.ClientHttpEngine clientHttpEngine
    • providerFactorySupplier

      protected Supplier<org.jboss.resteasy.spi.ResteasyProviderFactory> providerFactorySupplier
  • Constructor Details

    • JaxRsAdapterRestEasy

      protected JaxRsAdapterRestEasy(JaxRsAdapterRestEasyBuilder builder)
      A new JaxRS adapter backed by RESTEasy.
      Parameters:
      builder - The builder with the configuration for this instance.
  • Method Details

    • buildHttpClient

      public javax.ws.rs.client.Client buildHttpClient(ApiClientConfig config)
      Specified by:
      buildHttpClient in interface JaxRsAdapter
      Parameters:
      config - The current API client config.
      Returns:
      A new Jax RS client to use.
    • serialize

      public javax.ws.rs.client.Entity<?> serialize(Object obj, String contentType, ApiClientConfig config, Formatter formatter) throws ApiException
      Description copied from interface: JaxRsAdapter
      Serialize the given Java object into string entity according the given content type.
      Specified by:
      serialize in interface JaxRsAdapter
      Parameters:
      obj - the object to serialize
      contentType - the content type
      config - The current API client config
      formatter - The formatting helper
      Returns:
      The serialized Entity
      Throws:
      ApiException - On failure to serialize
    • deserialize

      public <T> T deserialize(javax.ws.rs.core.Response response, javax.ws.rs.core.GenericType<T> returnType, ApiClientConfig config, Formatter formatter) throws ApiException
      Description copied from interface: JaxRsAdapter
      Deserialize response body to Java object according to the content type.
      Specified by:
      deserialize in interface JaxRsAdapter
      Type Parameters:
      T - a Java type parameter
      Parameters:
      response - the response body to deserialize
      returnType - a Java type to deserialize into
      config - The current API client config
      formatter - The formatting helper
      Returns:
      A deserialized Java object
      Throws:
      ApiException - on failure to deserialize
    • downloadFileFromResponse

      protected final File downloadFileFromResponse(javax.ws.rs.core.Response response) throws ApiException
      Download file from the given response.
      Parameters:
      response - a response
      Returns:
      a file from the given response
      Throws:
      ApiException - If fail to read file content from response and write to disk
    • prepareDownloadFile

      protected final File prepareDownloadFile(javax.ws.rs.core.Response response) throws IOException
      Throws:
      IOException
    • builder

      public static JaxRsAdapterRestEasyBuilder builder()
      Returns:
      A new builder for configuring a JaxRS RestEASY adapter.