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 Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.client.ClientbuildHttpClient(ApiClientConfig config) <T> Tdeserialize(javax.ws.rs.core.Response response, javax.ws.rs.core.GenericType<T> returnType, ApiClientConfig config, Formatter formatter) Deserialize response body to Java object according to the content type.javax.ws.rs.client.Entity<?> serialize(Object obj, String contentType, ApiClientConfig config, Formatter formatter) Serialize the given Java object into string entity according the given content type.
-
Method Details
-
buildHttpClient
- 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 serializecontentType- the content typeconfig- The current API client configformatter- 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 deserializereturnType- a Java type to deserialize intoconfig- The current API client configformatter- The formatting helper- Returns:
- A deserialized Java object
- Throws:
ApiException- on failure to deserialize
-