Interface JaxRsAdapter

  • All Known Implementing Classes:
    JaxRsAdapterRestEasy

    @Generated("de.xima.openapi.codegen.java_jaxrs.XimaJavaJaxrsGenerator")
    public interface JaxRsAdapter
    Adapter for the API client that integrates with a Jax RS implementation.
    • Method Detail

      • buildHttpClient

        javax.ws.rs.client.Client buildHttpClient​(ApiClientConfig config)
        Parameters:
        config - The current API client config.
        Returns:
        A new Jax RS client to use.
      • serialize

        javax.ws.rs.client.Entity<?> serialize​(Object obj,
                                               String contentType,
                                               ApiClientConfig config,
                                               Formatter formatter)
                                        throws ApiException
        Serialize the given Java object into string entity according the given content type.
        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

        <T> T deserialize​(javax.ws.rs.core.Response response,
                          javax.ws.rs.core.GenericType<T> returnType,
                          ApiClientConfig config,
                          Formatter formatter)
                   throws ApiException
        Deserialize response body to Java object according to the content type.
        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