public class ClientFactory<T> extends Object
Implementation note: all internal methods are protected to enable testing.
| Constructor and Description |
|---|
ClientFactory(Class<T> clientType,
AbstractWriterConfig<?> config) |
| Modifier and Type | Method and Description |
|---|---|
T |
create() |
protected com.amazonaws.client.builder.AwsClientBuilder<?,?> |
createClientBuilder()
Picks an appropriate client builder, based on the configuration type.
|
protected void |
optSetRegionOrEndpoint(com.amazonaws.client.builder.AwsClientBuilder<?,?> builder)
If the configuration specifies region, attempts to set it.
|
protected void |
setAssumedRoleCredentialsProvider(com.amazonaws.client.builder.AwsClientBuilder<?,?> builder,
String roleToAssume)
Configures the builder with an assumed-role credentials provider.
|
protected T |
tryInstantiateFromFactory()
Determines whether the configuration specifies a factory method, and
if so tries to invoke it.
|
public ClientFactory(Class<T> clientType, AbstractWriterConfig<?> config)
public T create()
protected T tryInstantiateFromFactory()
protected com.amazonaws.client.builder.AwsClientBuilder<?,?> createClientBuilder()
protected void optSetRegionOrEndpoint(com.amazonaws.client.builder.AwsClientBuilder<?,?> builder)
protected void setAssumedRoleCredentialsProvider(com.amazonaws.client.builder.AwsClientBuilder<?,?> builder,
String roleToAssume)
Copyright © 2023. All rights reserved.