Class VaultRestApi
- java.lang.Object
-
- io.helidon.integrations.common.rest.RestApiBase
-
- io.helidon.integrations.vault.auths.common.VaultRestApi
-
- All Implemented Interfaces:
RestApi
public class VaultRestApi extends RestApiBase
REST API implementation with Vault specific features. Uses the correct type for exception.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VaultRestApi.Builder
Fluent API builder forVaultRestApi
.static class
VaultRestApi.BuilderBase<B extends VaultRestApi.BuilderBase<B>>
A base builder for VaultRestApi subclasses.
-
Constructor Summary
Constructors Modifier Constructor Description protected
VaultRestApi(VaultRestApi.BuilderBase<?> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VaultRestApi.Builder
builder()
A new builder.protected <T> Single<T>
emptyResponse(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, ResponseBuilder<?,T,?> responseBuilder)
Empty response, may be because of aHttp.Status.NOT_FOUND_404
, or some other status, such asHttp.Status.NOT_MODIFIED_304
.protected Throwable
readError(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, JsonObject entity)
Read error with a JSON entity.-
Methods inherited from class io.helidon.integrations.common.rest.RestApiBase
addHeaders, addQueryParams, errorResponse, ftHandler, handleBytesResponse, handleJsonResponse, handleOptionalJsonResponse, handlePublisherResponse, handleResponse, invoke, invokeBytesRequest, invokeBytesResponse, invokeOptional, invokePublisherResponse, invokeWithResponse, isEntityExpected, isSuccess, jsonBuilderFactory, jsonOkResponse, jsonReaderFactory, jsonWriterFactory, noEntityOkResponse, readError, readError, readErrorFailedEntity, requestBytesPayload, requestId, requestJsonPayload, requestPayload, responseSupplier, updateRequestBuilder, updateRequestBuilder, updateRequestBuilderBytesPayload, updateRequestBuilderCommon, webClient
-
-
-
-
Constructor Detail
-
VaultRestApi
protected VaultRestApi(VaultRestApi.BuilderBase<?> builder)
-
-
Method Detail
-
builder
public static VaultRestApi.Builder builder()
A new builder.- Returns:
- a new builder
-
emptyResponse
protected <T> Single<T> emptyResponse(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, ResponseBuilder<?,T,?> responseBuilder)
Description copied from class:RestApiBase
Empty response, may be because of aHttp.Status.NOT_FOUND_404
, or some other status, such asHttp.Status.NOT_MODIFIED_304
.- Overrides:
emptyResponse
in classRestApiBase
- Type Parameters:
T
- type of the response- Parameters:
path
- requested pathrequest
- original requestmethod
- HTTP methodrequestId
- ID of the requestresponse
- actual response where we do not expect an entityresponseBuilder
- builder to create a response instance- Returns:
- typed response with no entity
-
readError
protected Throwable readError(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, JsonObject entity)
Description copied from class:RestApiBase
Read error with a JSON entity.- Overrides:
readError
in classRestApiBase
- Parameters:
path
- requested pathrequest
- original API requestmethod
- HTTP methodrequestId
- request IDresponse
- web client response with entity consumedentity
- entity as a JSON object- Returns:
- a throwable to be used in response
-
-