Class SdkClientConfiguration.Builder
- java.lang.Object
-
- software.amazon.awssdk.core.client.config.SdkClientConfiguration.Builder
-
- All Implemented Interfaces:
Buildable,CopyableBuilder<SdkClientConfiguration.Builder,SdkClientConfiguration>,SdkBuilder<SdkClientConfiguration.Builder,SdkClientConfiguration>
- Enclosing class:
- SdkClientConfiguration
public static final class SdkClientConfiguration.Builder extends Object implements CopyableBuilder<SdkClientConfiguration.Builder,SdkClientConfiguration>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientOverrideConfiguration.BuilderasOverrideConfigurationBuilder()Create aClientOverrideConfiguration.Builderusing the values currently in this builder.SdkClientConfigurationbuild()<T> TcomputeOptionIfAbsent(ClientOption<T> option, Supplier<T> valueSupplier)Add a mapping between the provided key and value, if the current value for the option is null.SdkClientConfiguration.Buildercopy()<T> SdkClientConfiguration.BuilderlazyOption(ClientOption<T> option, AttributeMap.LazyValue<T> lazyValue)Add a mapping between the provided option and value provider.<T> SdkClientConfiguration.BuilderlazyOptionIfAbsent(ClientOption<T> option, AttributeMap.LazyValue<T> lazyValue)Equivalent tolazyOption(ClientOption, AttributeMap.LazyValue), but does not assign the value if there is already a non-null value assigned for the provided option.<T> Toption(ClientOption<T> option)Retrieve the value of a specific option.<T> SdkClientConfiguration.Builderoption(ClientOption<T> option, T value)Configure the value of a specific option.SdkClientConfiguration.BuilderputAll(Map<? extends ClientOption<?>,?> options)Adds all the options from the map provided.SdkClientConfiguration.BuilderputAll(ClientOverrideConfiguration configuration)Put all of the attributes from the provided override configuration into this one.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
-
-
-
Method Detail
-
asOverrideConfigurationBuilder
public ClientOverrideConfiguration.Builder asOverrideConfigurationBuilder()
Create aClientOverrideConfiguration.Builderusing the values currently in this builder.
-
option
public <T> SdkClientConfiguration.Builder option(ClientOption<T> option, T value)
Configure the value of a specific option.
-
lazyOption
public <T> SdkClientConfiguration.Builder lazyOption(ClientOption<T> option, AttributeMap.LazyValue<T> lazyValue)
Add a mapping between the provided option and value provider. The lazy value will only be resolved when the value is needed. During resolution, the lazy value is provided with a value reader. The value reader will fail if the reader attempts to read its own value (directly, or indirectly through other lazy values). If a value is updated that a lazy value is depended on, the lazy value will be re-resolved the next time the lazy value is accessed.
-
lazyOptionIfAbsent
public <T> SdkClientConfiguration.Builder lazyOptionIfAbsent(ClientOption<T> option, AttributeMap.LazyValue<T> lazyValue)
Equivalent tolazyOption(ClientOption, AttributeMap.LazyValue), but does not assign the value if there is already a non-null value assigned for the provided option.
-
option
public <T> T option(ClientOption<T> option)
Retrieve the value of a specific option.
-
computeOptionIfAbsent
public <T> T computeOptionIfAbsent(ClientOption<T> option, Supplier<T> valueSupplier)
Add a mapping between the provided key and value, if the current value for the option is null. Returns the value.
-
putAll
public SdkClientConfiguration.Builder putAll(Map<? extends ClientOption<?>,?> options)
Adds all the options from the map provided. This is not type safe, and will throw an exception during creation if a value in the map is not of the correct type for its option.
-
putAll
public SdkClientConfiguration.Builder putAll(ClientOverrideConfiguration configuration)
Put all of the attributes from the provided override configuration into this one.
-
copy
public SdkClientConfiguration.Builder copy()
- Specified by:
copyin interfaceCopyableBuilder<SdkClientConfiguration.Builder,SdkClientConfiguration>
-
build
public SdkClientConfiguration build()
- Specified by:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkBuilder<SdkClientConfiguration.Builder,SdkClientConfiguration>
-
-