Class AbstractSdkClientFactory<B extends com.oracle.bmc.common.ClientBuilderBase<B,T>,T>
java.lang.Object
io.micronaut.oraclecloud.core.sdk.AbstractSdkClientFactory<B,T>
- Type Parameters:
B
- The builder typeT
- The client type
public abstract class AbstractSdkClientFactory<B extends com.oracle.bmc.common.ClientBuilderBase<B,T>,T>
extends Object
Abstract base factory for SDK objects.
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractSdkClientFactory
(B builder, com.oracle.bmc.ClientConfiguration clientConfiguration, @Nullable com.oracle.bmc.http.ClientConfigurator clientConfigurator, @Nullable com.oracle.bmc.http.signing.RequestSignerFactory requestSignerFactory) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract T
build
(B clientBuilder, @NonNull com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider) Builds the client based on its builder to make sure user can configure required parameters in the builder.protected B
final void
setProvider
(@Nullable com.oracle.bmc.http.client.HttpProvider provider) Set the HTTP provider for this client.
-
Constructor Details
-
AbstractSdkClientFactory
protected AbstractSdkClientFactory(B builder, com.oracle.bmc.ClientConfiguration clientConfiguration, @Nullable @Nullable com.oracle.bmc.http.ClientConfigurator clientConfigurator, @Nullable @Nullable com.oracle.bmc.http.signing.RequestSignerFactory requestSignerFactory) Default constructor.- Parameters:
builder
- The builderclientConfiguration
- The client configclientConfigurator
- The client configurator (optional)requestSignerFactory
- The request signer factory (optional)
-
-
Method Details
-
getBuilder
- Returns:
- The builder
-
build
@NonNull protected abstract T build(@NonNull B clientBuilder, @NonNull @NonNull com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider) Builds the client based on its builder to make sure user can configure required parameters in the builder.- Parameters:
clientBuilder
- The builder for clientauthenticationDetailsProvider
- The authentication details provider- Returns:
- The client to build
-
setProvider
@Inject @Internal public final void setProvider(@Nullable @Nullable com.oracle.bmc.http.client.HttpProvider provider) Set the HTTP provider for this client. This is injected by the application context, in order to reuse the HTTP provider.- Parameters:
provider
- The provider to inject
-