Top Fields Constructors Methods
com.oracle.bmc.http.internal

public final Class ClientCall<REQ extends BmcRequest<?>, RESP extends BmcResponse, RESP_BUILDER extends BmcResponse.Builder<RESP>>

extends Object
Class Inheritance
Imports
com.oracle.bmc.ServiceDetails, com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider, .RefreshableOnNotAuthenticatedProvider, com.oracle.bmc.circuitbreaker.CallNotAllowedException, .OciCircuitBreaker, com.oracle.bmc.http.ClientConfigurator, com.oracle.bmc.http.client.HttpClient, .HttpRequest, .HttpResponse, .Method, .RequestInterceptor, .Serializer, com.oracle.bmc.http.signing.SigningStrategy, com.oracle.bmc.model.BmcException, .Range, .SdkRuntimeException, com.oracle.bmc.requests.BmcRequest, .HasContentLength, com.oracle.bmc.responses.AsyncHandler, .BmcResponse, com.oracle.bmc.retrier.BmcGenericRetrier, .Retriers, .RetryConfiguration, .TokenRefreshRetrier, com.oracle.bmc.util.internal.CollectionFormatType, .StringUtils, com.oracle.bmc.waiter.MaxAttemptsTerminationStrategy, .TerminationStrategy, .WaiterScheduler, jakarta.annotation.Nullable, org.slf4j.Logger, java.io.IOException, .InputStream, java.math.BigDecimal, java.util.ArrayList, .Collection, .Collections, .Date, .HashMap, .HashSet, .LinkedHashMap, .List, .Locale, .Map, .Set, .StringJoiner, .UUID, java.util.concurrent.CompletableFuture, .CompletionException, .CompletionStage, .Executor, .Future, java.util.function.BiConsumer, .BiFunction, .Function, .Supplier, .UnaryOperator

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private AbstractAuthenticationDetailsProvider
private OciCircuitBreaker
private ClientConfigurator
private static final String
private static final String
private boolean
private boolean
private Set<String>
private final HttpClient
private HttpRequest
private UnaryOperator<RESP>
private Logger
private SigningStrategy
private Executor
private static final String
private static final String
private boolean
private REQ
private Supplier<BmcRequest.Builder<? extends REQ, ?>>
private BiConsumer<RESP_BUILDER, Object>
private boolean
private Class<?>
private Supplier<RESP_BUILDER>
private ResponseErrorRuntimeExceptionFactory<ERRMODEL, E extends SdkRuntimeException>
private BiConsumer<RESP_BUILDER, Object>
private Map<String, BiConsumer<RESP_BUILDER, String>>
private Map<String, BiConsumer<RESP_BUILDER, Map<String, String>>>
private RetryConfiguration
private boolean
private String
private String
private String
private WaiterScheduler

Constructor Summary

AccessConstructor and Description
private
ClientCall(HttpClient httpClient)

Method Summary

Modifier and TypeMethod and Description
public ClientCall<REQ, RESP, RESP_BUILDER>
accept(String... contentType)

private void
public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
appendHeader(String name, String value)

public ClientCall<REQ, RESP, RESP_BUILDER>
appendHeader(String name, Range value)

public ClientCall<REQ, RESP, RESP_BUILDER>
appendHeader(String name, Number value)

public ClientCall<REQ, RESP, RESP_BUILDER>
appendHeader(String name, Date value)

public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
private ClientCall<REQ, RESP, RESP_BUILDER>
appendHeader(String name, Object value)

public ClientCall<REQ, RESP, RESP_BUILDER>
public <T> ClientCall<REQ, RESP, RESP_BUILDER>

Returns:

this ClientCall instance
appendListHeader
(String
the name of the header parameter as it should appear in the query string
headerParamName
,
List<T>
the values for the query parameter. An empty or null list will result in no action being taken on the target instance. Additionally, any null values inside the list will be ignored
values
,
CollectionFormatType
describes how entries should appear in the query string, for example as multiple parameters with the name query string parameter name/key, or as a single parameter with its values separated by a delimiter character (comma, space, tab or pipe)
collectionFormatType
)

Attempts to encode a header parameter which is described by a list of values for that parameter and a com.oracle.bmc.util.internal.CollectionFormatType which describes how the values should appear in the headers (e.g. as multiple parameters, as a single parameter with a given delimiter).

private <T> ClientCall<REQ, RESP, RESP_BUILDER>

Returns:

this ClientCall instance
appendListParameter
(String
the name of the parameter as it should appear in the request
paramName
,
List<T>
the values for the parameter. An empty or null list will result in no action being taken on the target instance. Additionally, any null values inside the list will be ignored
values
,
CollectionFormatType
describes how entries should appear in the query string, for example as multiple parameters with the name query string parameter name/key, or as a single parameter with its values separated by a delimiter character (comma, space, tab or pipe)
collectionFormatType
,
BiFunction<String, Object, ClientCall<REQ, RESP, RESP_BUILDER>>
the call to actually append the parameter
appendMethod
)

Attempts to encode a parameter which is described by a list of values for that parameter and a com.oracle.bmc.util.internal.CollectionFormatType which describes how the values should appear in the request (e.g. as multiple parameters, as a single parameter with a given delimiter).

public ClientCall<REQ, RESP, RESP_BUILDER>
appendListQueryParam(String name, List<?> values, CollectionFormatType collectionFormatType)

public ClientCall<REQ, RESP, RESP_BUILDER>

Returns:

a new target instance
appendMapHeader
(String
prefix for each key
prefix
,
Map<String, ?>
The map query parameter to encode.
queryParam
)

Attempts to encode a header param if it is a Map.

private ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
appendMapQueryParam(String prefix, Map<String, ?> values)

public ClientCall<REQ, RESP, RESP_BUILDER>
appendPathParam(String pathParamValue)

public ClientCall<REQ, RESP, RESP_BUILDER>
appendPathParam(Number pathParamValue)

public ClientCall<REQ, RESP, RESP_BUILDER>
appendPathParam(UUID pathParamValue)

public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
basePath(String basePath)

public static <REQ extends BmcRequest<?>, RESP extends BmcResponse, RESP_BUILDER extends BmcResponse.Builder<RESP>> ClientCall<REQ, RESP, RESP_BUILDER>
builder(HttpClient httpClient, REQ request, Supplier<RESP_BUILDER> responseBuilder)

private ServiceDetails
public Future<RESP>
callAsync(AsyncHandler<REQ, RESP> handler)

private CompletionStage<RESP>
callAsync0(AsyncHandler<REQ, RESP> handler)

private CompletionStage<RESP>
private CompletionStage<RESP>
private CompletionStage<RESP>
public RESP
private <T> CompletionStage<T>
public ClientCall<REQ, RESP, RESP_BUILDER>
circuitBreaker(OciCircuitBreaker circuitBreaker)

Use a circuit breaker for this call.

public ClientCall<REQ, RESP, RESP_BUILDER>
private static String
private static <T> CompletionStage<T>
private RESP
finalizeResponse(RESP_BUILDER builder)

public static String
public <RESP_BODY> ClientCall<REQ, RESP, RESP_BUILDER>
handleBody(Class<RESP_BODY> type, BiConsumer<RESP_BUILDER, RESP_BODY> handle)

public <RESP_BODY> ClientCall<REQ, RESP, RESP_BUILDER>
handleBodyList(Class<RESP_BODY> type, BiConsumer<RESP_BUILDER, List<RESP_BODY>> handle)

public <RESP_BODY> ClientCall<REQ, RESP, RESP_BUILDER>
handleBodyMap(Class<RESP_BODY> type, BiConsumer<RESP_BUILDER, Map<String, RESP_BODY>> handle)
Deprecated This method has never worked properly and will be removed in the future.

public <RESP_BODY> ClientCall<REQ, RESP, RESP_BUILDER>
handleEventStream(BiConsumer<RESP_BUILDER, RESP_BODY> handle)

public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
handleResponseHeaderDate(String name, BiConsumer<RESP_BUILDER, Date> handle)

public ClientCall<REQ, RESP, RESP_BUILDER>
handleResponseHeaderDouble(String name, BiConsumer<RESP_BUILDER, Double> handle)

public <E> ClientCall<REQ, RESP, RESP_BUILDER>
handleResponseHeaderEnum(String name, Function<String, E> parse, BiConsumer<RESP_BUILDER, E> handle)

public ClientCall<REQ, RESP, RESP_BUILDER>
handleResponseHeaderFloat(String name, BiConsumer<RESP_BUILDER, Float> handle)

public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
handleResponseHeaderLong(String name, BiConsumer<RESP_BUILDER, Long> handle)

public ClientCall<REQ, RESP, RESP_BUILDER>
handleResponseHeaderRange(String name, BiConsumer<RESP_BUILDER, Range> handle)

public ClientCall<REQ, RESP, RESP_BUILDER>
handleResponseHeadersMap(String prefix, BiConsumer<RESP_BUILDER, Map<String, String>> handle)

public ClientCall<REQ, RESP, RESP_BUILDER>
handleResponseHeaderString(String name, BiConsumer<RESP_BUILDER, String> handle)

public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
interceptResponse(UnaryOperator<RESP> interceptResponse)

private static boolean
private boolean
public ClientCall<REQ, RESP, RESP_BUILDER>
logger(Logger logger, String nickname)

public ClientCall<REQ, RESP, RESP_BUILDER>
method(Method method)

public ClientCall<REQ, RESP, RESP_BUILDER>
obmcsSigningStrategy(SigningStrategy obmcsSigningStrategy)

public ClientCall<REQ, RESP, RESP_BUILDER>
private ClientCall<REQ, RESP, RESP_BUILDER>
request(REQ request)

public ClientCall<REQ, RESP, RESP_BUILDER>
requestBuilder(Supplier<BmcRequest.Builder<? extends REQ, ?>> requestBuilder)

private ClientCall<REQ, RESP, RESP_BUILDER>
responseBuilder(Supplier<RESP_BUILDER> responseBuilder)

public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
public ClientCall<REQ, RESP, RESP_BUILDER>
serviceDetails(String serviceName, String operationName, String apiReferenceLink)

private <T, U> CompletionStage<U>
thenApply(CompletionStage<T> stage, Function<? super T, ? extends U> fn)

private <T, U> CompletionStage<U>
thenCompose(CompletionStage<T> stage, Function<? super T, ? extends CompletionStage<U>> fn)

private CompletionStage<RESP>
private void
public static RuntimeException

Returns:

BmcExceptionfrom causal chain, or CompletionException if there was none
tryUnwrapBmcException
(CompletionException
the CompletionException which may have a BmcException in its causal chain
ce
)

Try to unwrap the BmcException that is somewhere in the causal chain of the CompletionException, or return the original CompletionException, if there was none.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait