Class DefaultApiInvocation<T>
java.lang.Object
de.xima.fc.api.rest.pub.client.security.DefaultApiInvocation<T>
- Type Parameters:
T- Type of the response.
- All Implemented Interfaces:
ApiInvocation<T>
@Generated("de.xima.openapi.codegen.java_jaxrs.XimaJavaJaxrsGenerator")
public final class DefaultApiInvocation<T>
extends Object
implements ApiInvocation<T>
Default implementation of a
ApiInvocation which simply delegates to the ApiClient.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultApiInvocation(ApiClient apiClient, ApiCall<?> call) Creates a new wrapper for an API call to provide multiple dispatch styles. -
Method Summary
Modifier and TypeMethodDescriptionasync()Invokes the request asynchronously via theAsyncInvoker, without a callback.async(javax.ws.rs.client.InvocationCallback<ApiResponse<T>> invocationCallback) Invokes the request asynchronously via theAsyncInvoker, with a callback.invoke()Invokes the request synchronously viaInvocation.invoke().rx()Invokes the request asynchronously via theCompletionStageRxInvoker.
-
Constructor Details
-
DefaultApiInvocation
-
-
Method Details
-
async
Description copied from interface:ApiInvocationInvokes the request asynchronously via theAsyncInvoker, without a callback.- Specified by:
asyncin interfaceApiInvocation<T>- Returns:
- A future for the result obtained from the response.
- See Also:
-
async
public Future<ApiResponse<T>> async(javax.ws.rs.client.InvocationCallback<ApiResponse<T>> invocationCallback) Description copied from interface:ApiInvocationInvokes the request asynchronously via theAsyncInvoker, with a callback. Note: You can use the future to wait until the request finishes, but you should not access the response via the future -- use the callback to access the response.- Specified by:
asyncin interfaceApiInvocation<T>- Parameters:
invocationCallback- Callback which is invoked with the result of the response.- Returns:
- A future for the result obtained from the response.
- See Also:
-
invoke
Description copied from interface:ApiInvocationInvokes the request synchronously viaInvocation.invoke().- Specified by:
invokein interfaceApiInvocation<T>- Returns:
- The result obtained from the response.
- Throws:
ApiException- When the request could not be executed, e.g. when the server could not be reached or the server sent an invalid response. No exception is thrown if the server simply sends a 4xx or 5xx status code and that status code was defined in the API specification.- See Also:
-
rx
Description copied from interface:ApiInvocationInvokes the request asynchronously via theCompletionStageRxInvoker.- Specified by:
rxin interfaceApiInvocation<T>- Returns:
- A pending stage for the result obtained from the response
-