All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java-helidon.client.libraries.se.ApiResponse.mustache Maven / Gradle / Ivy

There is a newer version: 7.7.0
Show newest version
{{>licenseInfo}}
package {{invokerPackage}};

import java.util.concurrent.ExecutionException;

import io.helidon.common.GenericType;
import io.helidon.common.reactive.Single;
import io.helidon.webclient.WebClientResponse;

{{#appName}}
/**
 * Generic-typed response.
 *
 * Return type for generated API methods.
 *
 * @param  type of the return value from the generated API method
 */
{{/appName}}
public interface ApiResponse {

  static  ApiResponse create(GenericType responseType, Single webClientResponse) {
    return new ApiResponseBase<>(responseType, webClientResponse);
  }

  /**
   * @returns reactive access to the {@link WebClientResponse} describing the response from the server
   */
  Single webClientResponse();

  /**
   * @return reactive access to the value returned in the response from the server
   */
  Single result() throws ExecutionException, InterruptedException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy