protected void |
RestApiBase.addHeaders(WebClientRequestBuilder requestBuilder,
String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId) |
Add HTTP headers.
|
protected void |
RestApiBase.addQueryParams(WebClientRequestBuilder requestBuilder,
String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId) |
Add HTTP query parameters.
|
protected <T> Single<T> |
RestApiBase.emptyResponse(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response,
ResponseBuilder<?,T,?> responseBuilder) |
|
protected <T extends ApiResponse> Single<T> |
RestApiBase.errorResponse(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response) |
Create an error response.
|
protected <R,T extends ApiOptionalResponse<R>> Single<T> |
RestApiBase.handleBytesResponse(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response,
ApiOptionalResponse.BuilderBase<?,T,byte[],R> responseBuilder) |
Handle bytes response for optional bytes entity.
|
protected <T extends ApiEntityResponse> Single<T> |
RestApiBase.handleJsonResponse(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response,
ApiEntityResponse.Builder<?,T,JsonObject> responseBuilder) |
Reads JsonObject from response entity and either calls the jsonOkResponse or errorResponse depending
on its success.
|
protected <R,T extends ApiOptionalResponse<R>> Single<T> |
RestApiBase.handleOptionalJsonResponse(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response,
ApiOptionalResponse.BuilderBase<?,T,JsonObject,R> responseBuilder) |
Handle response for optional JSON entity.
|
protected <R,T extends ApiOptionalResponse<R>> Single<T> |
RestApiBase.handlePublisherResponse(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response,
ApiOptionalResponse.BuilderBase<?,T,Multi<DataChunk>,R> responseBuilder) |
Handle response for optional publisher entity.
|
protected <T extends ApiResponse> Single<T> |
RestApiBase.handleResponse(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response,
ApiResponse.Builder<?,T> responseBuilder) |
Handle response for a request not expecting an entity.
|
<T extends ApiResponse> Single<T> |
RestApi.invoke(Http.RequestMethod method,
String path,
ApiRequest<?> request,
ApiResponse.Builder<?,T> responseBuilder) |
Invoke a request that is not expected to yield an entity.
|
<T extends ApiResponse> Single<T> |
RestApiBase.invoke(Http.RequestMethod method,
String path,
ApiRequest<?> request,
ApiResponse.Builder<?,T> responseBuilder) |
|
<T extends ApiResponse> Single<T> |
RestApi.invokeBytesRequest(Http.RequestMethod method,
String path,
ApiRequest<?> request,
Flow.Publisher<DataChunk> byteRequest,
ApiResponse.Builder<?,T> responseBuilder) |
|
<T extends ApiResponse> Single<T> |
RestApiBase.invokeBytesRequest(Http.RequestMethod method,
String path,
ApiRequest<?> request,
Flow.Publisher<DataChunk> byteRequest,
ApiResponse.Builder<?,T> responseBuilder) |
|
<R,T extends ApiOptionalResponse<R>> Single<T> |
RestApi.invokeBytesResponse(Http.RequestMethod method,
String path,
ApiRequest<?> request,
ApiOptionalResponse.BuilderBase<?,T,byte[],R> responseBuilder) |
Invoke API call that is expected to return bytes.
|
<R,T extends ApiOptionalResponse<R>> Single<T> |
RestApiBase.invokeBytesResponse(Http.RequestMethod method,
String path,
ApiRequest<?> request,
ApiOptionalResponse.BuilderBase<?,T,byte[],R> responseBuilder) |
|
<R,T extends ApiOptionalResponse<R>> Single<T> |
RestApi.invokeOptional(Http.RequestMethod method,
String path,
ApiRequest<?> request,
ApiOptionalResponse.BuilderBase<?,T,JsonObject,R> responseBuilder) |
Invoke a request that may yield an entity.
|
<R,T extends ApiOptionalResponse<R>> Single<T> |
RestApiBase.invokeOptional(Http.RequestMethod method,
String path,
ApiRequest<?> request,
ApiOptionalResponse.BuilderBase<?,T,JsonObject,R> responseBuilder) |
|
<R,T extends ApiOptionalResponse<R>> Single<T> |
RestApi.invokePublisherResponse(Http.RequestMethod method,
String path,
ApiRequest<?> request,
ApiOptionalResponse.BuilderBase<?,T,Multi<DataChunk>,R> responseBuilder) |
Invoke API call that is expected to return bytes as a publisher.
|
<R,T extends ApiOptionalResponse<R>> Single<T> |
RestApiBase.invokePublisherResponse(Http.RequestMethod method,
String path,
ApiRequest<?> request,
ApiOptionalResponse.BuilderBase<?,T,Multi<DataChunk>,R> responseBuilder) |
|
<T extends ApiEntityResponse> Single<T> |
RestApi.invokeWithResponse(Http.RequestMethod method,
String path,
ApiRequest<?> request,
ApiEntityResponse.Builder<?,T,JsonObject> responseBuilder) |
Invoke a request that is expected to yield an entity.
|
<T extends ApiEntityResponse> Single<T> |
RestApiBase.invokeWithResponse(Http.RequestMethod method,
String path,
ApiRequest<?> request,
ApiEntityResponse.Builder<?,T,JsonObject> responseBuilder) |
|
protected boolean |
RestApiBase.isEntityExpected(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
Http.ResponseStatus status) |
This method is only called for methods that return an optional entity.
|
protected boolean |
RestApiBase.isSuccess(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
Http.ResponseStatus status) |
Provide information whether the response is a success response for requests with optional entity.
|
protected <T> T |
RestApiBase.jsonOkResponse(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response,
JsonObject json,
ResponseBuilder<?,T,JsonObject> responseBuilder) |
Builds the response using the response builder provided.
|
protected <T extends ApiResponse> Single<T> |
RestApiBase.noEntityOkResponse(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response,
ApiResponse.Builder<?,T> responseBuilder) |
Create a response for no entity.
|
protected Throwable |
RestApiBase.readError(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response) |
Read error with no entity (content length set to 0).
|
protected Throwable |
RestApiBase.readError(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response,
String entity) |
Read error with an entity that failed to be parsed into a JSON object.
|
protected Throwable |
RestApiBase.readError(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response,
JsonObject errorObject) |
Read error with a JSON entity.
|
protected Throwable |
RestApiBase.readErrorFailedEntity(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientResponse response,
Throwable throwable) |
Read error information when we failed to read resposen entity.
|
protected Supplier<Single<WebClientResponse>> |
RestApiBase.requestBytesPayload(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientRequestBuilder requestBuilder,
Flow.Publisher<DataChunk> publisher) |
Create a supplier for a response with publisher request.
|
protected Supplier<Single<WebClientResponse>> |
RestApiBase.requestJsonPayload(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientRequestBuilder requestBuilder,
JsonObject jsonObject) |
Create a supplier for a response with JSON request.
|
protected Supplier<Single<WebClientResponse>> |
RestApiBase.requestPayload(String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
WebClientRequestBuilder requestBuilder) |
Create a supplier for a response.
|
protected Supplier<Single<WebClientResponse>> |
RestApiBase.responseSupplier(Http.RequestMethod method,
String path,
ApiRequest<?> request,
String requestId) |
Create a response supplier from the request.
|
protected Single<WebClientRequestBuilder> |
RestApiBase.updateRequestBuilder(WebClientRequestBuilder requestBuilder,
String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId) |
Update request builder with no request payload.
|
protected Single<WebClientRequestBuilder> |
RestApiBase.updateRequestBuilder(WebClientRequestBuilder requestBuilder,
String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId,
JsonObject jsonObject) |
Update request builder with no request payload.
|
protected Single<WebClientRequestBuilder> |
RestApiBase.updateRequestBuilderBytesPayload(WebClientRequestBuilder requestBuilder,
String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId) |
Update request builder with publisher request payload.
|
protected Single<WebClientRequestBuilder> |
RestApiBase.updateRequestBuilderCommon(WebClientRequestBuilder requestBuilder,
String path,
ApiRequest<?> request,
Http.RequestMethod method,
String requestId) |
Update request builder used by all default implementation in RestApiBase .
|