Class OciRestApi
- java.lang.Object
-
- io.helidon.integrations.common.rest.RestApiBase
-
- io.helidon.integrations.oci.connect.OciRestApi
-
- All Implemented Interfaces:
RestApi
@Deprecated(since="2.5.0", forRemoval=true) public class OciRestApi extends RestApiBase
Deprecated, for removal: This API element is subject to removal in a future version.OCI SDK insteadOCI specific REST API. This class uses HTTP Signatures to sign requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OciRestApi.Builder
Deprecated, for removal: This API element is subject to removal in a future version.Fluent API builder forOciRestApi
.static class
OciRestApi.ConfigType
Deprecated, for removal: This API element is subject to removal in a future version.How to connect to OCI.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static OciRestApi.Builder
builder()
Deprecated, for removal: This API element is subject to removal in a future version.A new builder to configure instances.static OciRestApi
create()
Deprecated, for removal: This API element is subject to removal in a future version.Create API with default configuration.static OciRestApi
create(Config config)
Deprecated, for removal: This API element is subject to removal in a future version.Create OCI REST API from configuration.protected Throwable
readError(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response)
Deprecated, for removal: This API element is subject to removal in a future version.Read error with no entity (content length set to 0).protected Throwable
readError(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, String entity)
Deprecated, for removal: This API element is subject to removal in a future version.Read error with an entity that failed to be parsed into a JSON object.protected Throwable
readError(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, JsonObject json)
Deprecated, for removal: This API element is subject to removal in a future version.Read error with a JSON entity.protected Throwable
readErrorFailedEntity(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, Throwable it)
Deprecated, for removal: This API element is subject to removal in a future version.Read error information when we failed to read resposen entity.protected Supplier<Single<WebClientResponse>>
requestBytesPayload(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientRequestBuilder requestBuilder, Flow.Publisher<DataChunk> publisher)
Deprecated, for removal: This API element is subject to removal in a future version.Create a supplier for a response with publisher request.protected Supplier<Single<WebClientResponse>>
requestJsonPayload(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientRequestBuilder requestBuilder, JsonObject jsonObject)
Deprecated, for removal: This API element is subject to removal in a future version.Create a supplier for a response with JSON request.protected Supplier<Single<WebClientResponse>>
responseSupplier(Http.RequestMethod method, String path, ApiRequest<?> request, String requestId)
Deprecated, for removal: This API element is subject to removal in a future version.Create a response supplier from the request.protected Single<WebClientRequestBuilder>
updateRequestBuilder(WebClientRequestBuilder requestBuilder, String path, ApiRequest<?> request, Http.RequestMethod method, String requestId)
Deprecated, for removal: This API element is subject to removal in a future version.Update request builder with no request payload.protected Single<WebClientRequestBuilder>
updateRequestBuilderBytesPayload(WebClientRequestBuilder requestBuilder, String path, ApiRequest<?> request, Http.RequestMethod method, String requestId)
Deprecated, for removal: This API element is subject to removal in a future version.Update request builder with publisher request payload.protected Single<WebClientRequestBuilder>
updateRequestBuilderCommon(WebClientRequestBuilder requestBuilder, String path, ApiRequest<?> request, Http.RequestMethod method, String requestId)
Deprecated, for removal: This API element is subject to removal in a future version.Update request builder used by all default implementation inRestApiBase
.-
Methods inherited from class io.helidon.integrations.common.rest.RestApiBase
addHeaders, addQueryParams, emptyResponse, errorResponse, ftHandler, handleBytesResponse, handleJsonResponse, handleOptionalJsonResponse, handlePublisherResponse, handleResponse, invoke, invokeBytesRequest, invokeBytesResponse, invokeOptional, invokePublisherResponse, invokeWithResponse, isEntityExpected, isSuccess, jsonBuilderFactory, jsonOkResponse, jsonReaderFactory, jsonWriterFactory, noEntityOkResponse, requestId, requestPayload, updateRequestBuilder, webClient
-
-
-
-
Method Detail
-
builder
public static OciRestApi.Builder builder()
Deprecated, for removal: This API element is subject to removal in a future version.A new builder to configure instances.- Returns:
- a new builder
-
create
public static OciRestApi create()
Deprecated, for removal: This API element is subject to removal in a future version.Create API with default configuration.- Returns:
- a new REST API with default configuration
-
create
public static OciRestApi create(Config config)
Deprecated, for removal: This API element is subject to removal in a future version.Create OCI REST API from configuration.- Parameters:
config
- configuration- Returns:
- a new REST API configured from config
-
responseSupplier
protected Supplier<Single<WebClientResponse>> responseSupplier(Http.RequestMethod method, String path, ApiRequest<?> request, String requestId)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:RestApiBase
Create a response supplier from the request. This method checks if there is a payload, and prepares the supplier based on this information.- Overrides:
responseSupplier
in classRestApiBase
- Parameters:
method
- HTTP method to invokepath
- path to invokerequest
- request that may contain a JSON entityrequestId
- request ID to use for this request- Returns:
- supplier of response that is used with fault tolerance
-
requestBytesPayload
protected Supplier<Single<WebClientResponse>> requestBytesPayload(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientRequestBuilder requestBuilder, Flow.Publisher<DataChunk> publisher)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:RestApiBase
Create a supplier for a response with publisher request. Defaults to "() -> clientRequest.submit(publisher)
". Also configures content type and accept headers.- Overrides:
requestBytesPayload
in classRestApiBase
- Parameters:
path
- path requestedrequest
- API requestmethod
- HTTP methodrequestId
- ID of this requestrequestBuilder
-WebClient
request builderpublisher
- publisher to be used as request entity- Returns:
- supplier of a web client response
-
readErrorFailedEntity
protected Throwable readErrorFailedEntity(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, Throwable it)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:RestApiBase
Read error information when we failed to read resposen entity.- Overrides:
readErrorFailedEntity
in classRestApiBase
- Parameters:
path
- requested pathrequest
- original requestmethod
- HTTP methodrequestId
- ID of the requestresponse
- actual response where we do not expect an entityit
- throwable that caused this problem (such as parsing exception)- Returns:
- throwable to be used in response
-
readError
protected Throwable readError(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:RestApiBase
Read error with no entity (content length set to 0).- Overrides:
readError
in classRestApiBase
- Parameters:
path
- requested pathrequest
- original API requestmethod
- HTTP methodrequestId
- request IDresponse
- web client response with entity consumed- Returns:
- a throwable to be used in response
-
readError
protected Throwable readError(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, String entity)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:RestApiBase
Read error with an entity that failed to be parsed into a JSON object.- Overrides:
readError
in classRestApiBase
- Parameters:
path
- requested pathrequest
- original API requestmethod
- HTTP methodrequestId
- request IDresponse
- web client response with entity consumedentity
- entity as a string- Returns:
- a throwable to be used in response
-
readError
protected Throwable readError(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, JsonObject json)
Deprecated, for removal: This API element is subject to removal in a future version.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 consumedjson
- entity as a JSON object- Returns:
- a throwable to be used in response
-
updateRequestBuilder
protected Single<WebClientRequestBuilder> updateRequestBuilder(WebClientRequestBuilder requestBuilder, String path, ApiRequest<?> request, Http.RequestMethod method, String requestId)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:RestApiBase
Update request builder with no request payload. Default implementation does nothing.- Overrides:
updateRequestBuilder
in classRestApiBase
- Parameters:
requestBuilder
- current request builderpath
- path to be executedrequest
- API requestmethod
- methodrequestId
- request ID- Returns:
- updated builder
-
updateRequestBuilderBytesPayload
protected Single<WebClientRequestBuilder> updateRequestBuilderBytesPayload(WebClientRequestBuilder requestBuilder, String path, ApiRequest<?> request, Http.RequestMethod method, String requestId)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:RestApiBase
Update request builder with publisher request payload. Default implementation does nothing.- Overrides:
updateRequestBuilderBytesPayload
in classRestApiBase
- Parameters:
requestBuilder
- current request builderpath
- path to be executedrequest
- API requestmethod
- methodrequestId
- request ID- Returns:
- updated builder
-
requestJsonPayload
protected Supplier<Single<WebClientResponse>> requestJsonPayload(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientRequestBuilder requestBuilder, JsonObject jsonObject)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:RestApiBase
Create a supplier for a response with JSON request. Defaults to "() -> clientRequest.submit(jsonObject)
". Also configures content type and accept headers.- Overrides:
requestJsonPayload
in classRestApiBase
- Parameters:
path
- path requestedrequest
- API requestmethod
- HTTP methodrequestId
- ID of this requestrequestBuilder
-WebClient
request builderjsonObject
- JSON object that should be sent as a request entity- Returns:
- supplier of a web client response
-
updateRequestBuilderCommon
protected Single<WebClientRequestBuilder> updateRequestBuilderCommon(WebClientRequestBuilder requestBuilder, String path, ApiRequest<?> request, Http.RequestMethod method, String requestId)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:RestApiBase
Update request builder used by all default implementation inRestApiBase
.- Overrides:
updateRequestBuilderCommon
in classRestApiBase
- Parameters:
requestBuilder
- current request builderpath
- path to be executedrequest
- API requestmethod
- methodrequestId
- request ID- Returns:
- updated builder
-
-