Class DefaultApiInvocation<T>
- java.lang.Object
-
- de.xima.fc.api.rest.pub.client.user.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 aApiInvocationwhich simply delegates to theApiClient.
-
-
Constructor Summary
Constructors Constructor Description DefaultApiInvocation(ApiClient apiClient, ApiCall<?> call)Creates a new wrapper for an API call to provide multiple dispatch styles.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Future<ApiResponse<T>>async()Invokes the request asynchronously via theAsyncInvoker, without a callback.Future<ApiResponse<T>>async(javax.ws.rs.client.InvocationCallback<ApiResponse<T>> invocationCallback)Invokes the request asynchronously via theAsyncInvoker, with a callback.ApiResponse<T>invoke()Invokes the request synchronously viaInvocation.invoke().CompletionStage<ApiResponse<T>>rx()Invokes the request asynchronously via theCompletionStageRxInvoker.
-
-
-
Method Detail
-
async
public Future<ApiResponse<T>> 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:
Invocation.submit()
-
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:
Invocation.submit(InvocationCallback)
-
invoke
public ApiResponse<T> invoke() throws ApiException
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:
Invocation.invoke()
-
rx
public CompletionStage<ApiResponse<T>> 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
-
-