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

pack-priv abstract Class BaseClient

extends Object
implements AutoCloseable
Class Inheritance
All Implemented Interfaces
java.lang.AutoCloseable
Known Direct Subclasses
com.oracle.bmc.http.internal.BaseSyncClient, com.oracle.bmc.http.internal.BaseAsyncClient
Imports
com.oracle.bmc.internal.SpiClientConfigurator, .Alloy, .EndpointBuilder, com.oracle.bmc.util.internal.ClientCompatibilityChecker, .Validate, com.oracle.bmc.ClientConfiguration, .ClientRuntime, .Realm, .Region, .Service, com.oracle.bmc.auth.BasicAuthenticationDetailsProvider, .ProvidesClientConfigurators, .RegionProvider, com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration, .OciCircuitBreaker, com.oracle.bmc.common.ClientBuilderBase, .InternalBuilderAccess, .RegionalClientBuilder, com.oracle.bmc.http.ClientConfigurator, .CompositeClientConfigurator, .DefaultConfigurator, .Priorities, com.oracle.bmc.http.client.HttpClient, .HttpClientBuilder, .HttpProvider, .StandardClientProperties, com.oracle.bmc.http.signing.RequestSigner, .SigningStrategy, com.oracle.bmc.requests.BmcRequest, com.oracle.bmc.responses.BmcResponse, org.slf4j.Logger, .LoggerFactory, java.net.URI, java.time.Duration, java.util.ArrayList, .EnumMap, .List, .Locale, .Map, .HashSet, .Arrays, .Optional, java.util.function.Supplier, java.util.regex.Matcher, .Pattern

Field Summary

Modifier and TypeField and Description
private final AbstractAuthenticationDetailsProvider
private OciCircuitBreaker
private final CircuitBreakerConfiguration
private static final ClientIdFilter
public final String
clientCommonLibraryVersion

Compatible SDK version, provided by the codegen.

pack-priv final ClientConfiguration
private final ClientConfigurator
private static final ClientConfigurator
private final RequestSigner
private static final String
private volatile String
private volatile HttpClient
private final HttpProvider
private static final String
private static final LogHeadersFilter
private final Logger
public final Optional<String>
minimumClientCommonLibraryVersionFromClient

Minimum compatible SDK version, maybe provided by the codegen.

private volatile Region
private final Map<SigningStrategy, RequestSigner>
private final Service

Constructor Summary

AccessConstructor and Description
protected
BaseClient(ClientBuilderBase<?, ?> builder, AbstractAuthenticationDetailsProvider authenticationDetailsProvider, CircuitBreakerConfiguration circuitBreakerConfiguration)

Method Summary

Modifier and TypeMethod and Description
protected <REQ extends BmcRequest<?>, RESP extends BmcResponse, RESP_BUILDER extends BmcResponse.Builder<RESP>> ClientCall<REQ, RESP, RESP_BUILDER>
clientCall(REQ request, Supplier<RESP_BUILDER> responseBuilder)

public final void
close()

Implements java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources.

public String
protected ClientConfigurator
public final String
public Optional<String>
private List<String>
parseEndpointForParams(String endpointTemplate)

public final void
populateServiceParametersInEndpoint(String
The endpoint template in use
endpoint
,
Map<String, Object>
Map of parameter name as key and value set in request path or query parameter as value
requiredParametersMap
)

Populate the parameters in the endpoint with its corresponding value and update the base endpoint.

public final synchronized void
refreshClient()

Rebuild the backing HttpClient.

public final synchronized void
setEndpoint(String endpoint)

protected void
setRegion(Region region)

protected void
setRegion(String regionId)

public final synchronized void
updateBaseEndpoint(String
The updated endpoint to use
endpoint
)

This method should be used for parameterized endpoint templates only.

public synchronized void
useRealmSpecificEndpointTemplate(boolean
This flag can be set to true or false to enable or disable the use of realm-specific endpoint template respectively
useOfRealmSpecificEndpointTemplateEnabled
)

This method should be used to enable or disable the use of realm-specific endpoint template.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

authenticationDetailsProviderback to summary
private final AbstractAuthenticationDetailsProvider authenticationDetailsProvider
circuitBreakerback to summary
private OciCircuitBreaker circuitBreaker
circuitBreakerConfigurationback to summary
private final CircuitBreakerConfiguration circuitBreakerConfiguration
CLIENT_ID_FILTERback to summary
private static final ClientIdFilter CLIENT_ID_FILTER
clientCommonLibraryVersionback to summary
public final String clientCommonLibraryVersion

Compatible SDK version, provided by the codegen.

clientConfigurationToUseback to summary
pack-priv final ClientConfiguration clientConfigurationToUse
clientConfiguratorback to summary
private final ClientConfigurator clientConfigurator
DEFAULT_CONFIGURATORback to summary
private static final ClientConfigurator DEFAULT_CONFIGURATOR
defaultRequestSignerback to summary
private final RequestSigner defaultRequestSigner
DISABLED_SPI_CLASSES_STRINGback to summary
private static final String DISABLED_SPI_CLASSES_STRING
endpointback to summary
private volatile String endpoint
httpClientback to summary
private volatile HttpClient httpClient
httpProviderback to summary
private final HttpProvider httpProvider
JAVASDK_DISABLED_SPI_CLASSES_PROPERTYback to summary
private static final String JAVASDK_DISABLED_SPI_CLASSES_PROPERTY
LOG_HEADERS_FILTERback to summary
private static final LogHeadersFilter LOG_HEADERS_FILTER
loggerback to summary
private final Logger logger
minimumClientCommonLibraryVersionFromClientback to summary
public final Optional<String> minimumClientCommonLibraryVersionFromClient

Minimum compatible SDK version, maybe provided by the codegen.

regionback to summary
private volatile Region region
requestSignersback to summary
private final Map<SigningStrategy, RequestSigner> requestSigners
serviceback to summary
private final Service service

Constructor Detail

BaseClientback to summary
protected BaseClient(ClientBuilderBase<?, ?> builder, AbstractAuthenticationDetailsProvider authenticationDetailsProvider, CircuitBreakerConfiguration circuitBreakerConfiguration)

Method Detail

clientCallback to summary
protected <REQ extends BmcRequest<?>, RESP extends BmcResponse, RESP_BUILDER extends BmcResponse.Builder<RESP>> ClientCall<REQ, RESP, RESP_BUILDER> clientCall(REQ request, Supplier<RESP_BUILDER> responseBuilder)
closeback to summary
public final void close()

Implements java.lang.AutoCloseable.close.

Doc from java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

Annotations
@Override
getClientCommonLibraryVersionback to summary
public String getClientCommonLibraryVersion()
getDefaultConfiguratorback to summary
protected ClientConfigurator getDefaultConfigurator()
getEndpointback to summary
public final String getEndpoint()
getMinimumClientCommonLibraryVersionFromClientback to summary
public Optional<String> getMinimumClientCommonLibraryVersionFromClient()
parseEndpointForParamsback to summary
private List<String> parseEndpointForParams(String endpointTemplate)
populateServiceParametersInEndpointback to summary
public final void populateServiceParametersInEndpoint(String endpoint, Map<String, Object> requiredParametersMap)

Populate the parameters in the endpoint with its corresponding value and update the base endpoint. The value will be populated iff the parameter in endpoint is a required request path parameter or a required request query parameter. If not, the parameter in the endpoint will be ignored and left blank.

Parameters
endpoint:String

The endpoint template in use

requiredParametersMap:Map<String, Object>

Map of parameter name as key and value set in request path or query parameter as value

refreshClientback to summary
public final synchronized void refreshClient()

Rebuild the backing HttpClient. This will call ClientConfigurators again, and can be used to e.g. refresh the SSL certificate.

setEndpointback to summary
public final synchronized void setEndpoint(String endpoint)
setRegionback to summary
protected void setRegion(Region region)
setRegionback to summary
protected void setRegion(String regionId)
updateBaseEndpointback to summary
public final synchronized void updateBaseEndpoint(String endpoint)

This method should be used for parameterized endpoint templates only. This does not include {region} and {secondLevelDomain} parameters.

Parameters
endpoint:String

The updated endpoint to use

useRealmSpecificEndpointTemplateback to summary
public synchronized void useRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)

This method should be used to enable or disable the use of realm-specific endpoint template. The default value is null. To enable the use of endpoint template defined for the realm in use, set the flag to true To disable the use of endpoint template defined for the realm in use, set the flag to false

Parameters
useOfRealmSpecificEndpointTemplateEnabled:boolean

This flag can be set to true or false to enable or disable the use of realm-specific endpoint template respectively