Subclass - Concrete builder type, used for better fluent methods.TypeToBuild - Type that this builder builds.@NotThreadSafe public abstract class AwsClientBuilder<Subclass extends AwsClientBuilder,TypeToBuild> extends Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
AwsClientBuilder.EndpointConfiguration
A container for configuration required to submit requests to a service (service endpoint and signing region) 
 | 
| Modifier and Type | Method and Description | 
|---|---|
abstract TypeToBuild | 
build()
Builds a client with the configure properties. 
 | 
ClientConfiguration | 
getClientConfiguration()
Gets the ClientConfiguration currently configured in the builder 
 | 
CsmConfigurationProvider | 
getClientSideMonitoringConfigurationProvider()  | 
AWSCredentialsProvider | 
getCredentials()
Gets the AWSCredentialsProvider currently configured in the builder. 
 | 
AwsClientBuilder.EndpointConfiguration | 
getEndpoint()
Gets the service endpointConfiguration in use by the builder 
 | 
RequestMetricCollector | 
getMetricsCollector()
Gets the  
RequestMetricCollector in use by the builder. | 
MonitoringListener | 
getMonitoringListener()
Gets the  
MonitoringListener in use by the builder. | 
String | 
getRegion()
Gets the region in use by the builder. 
 | 
List<RequestHandler2> | 
getRequestHandlers()
Gets the list of request handlers in use by the builder. 
 | 
void | 
setClientConfiguration(ClientConfiguration config)
Sets the ClientConfiguration to be used by the client. 
 | 
void | 
setClientSideMonitoringConfigurationProvider(CsmConfigurationProvider csmConfig)  | 
void | 
setCredentials(AWSCredentialsProvider credentialsProvider)
Sets the AWSCredentialsProvider used by the client. 
 | 
void | 
setEndpointConfiguration(AwsClientBuilder.EndpointConfiguration endpointConfiguration)
Sets the endpoint configuration (service endpoint & signing region) to be used for requests. 
 | 
void | 
setMetricsCollector(RequestMetricCollector metrics)
Sets a custom RequestMetricCollector to use for the client. 
 | 
void | 
setMonitoringListener(MonitoringListener monitoringListener)
Sets a custom MonitoringListener to use for the client. 
 | 
void | 
setRegion(String region)
Sets the region to be used by the client. 
 | 
void | 
setRequestHandlers(RequestHandler2... handlers)
Sets the request handlers to use in the client. 
 | 
Subclass | 
withClientConfiguration(ClientConfiguration config)
Sets the ClientConfiguration to be used by the client. 
 | 
Subclass | 
withClientSideMonitoringConfigurationProvider(CsmConfigurationProvider csmConfig)  | 
Subclass | 
withCredentials(AWSCredentialsProvider credentialsProvider)
Sets the AWSCredentialsProvider used by the client. 
 | 
Subclass | 
withEndpointConfiguration(AwsClientBuilder.EndpointConfiguration endpointConfiguration)
Sets the endpoint configuration (service endpoint & signing region) to be used for requests. 
 | 
Subclass | 
withMetricsCollector(RequestMetricCollector metrics)
Sets a custom RequestMetricCollector to use for the client. 
 | 
Subclass | 
withMonitoringListener(MonitoringListener monitoringListener)
Sets a custom MonitoringListener to use for the client. 
 | 
Subclass | 
withRegion(Regions region)
Sets the region to be used by the client. 
 | 
Subclass | 
withRegion(String region)
Sets the region to be used by the client. 
 | 
Subclass | 
withRequestHandlers(RequestHandler2... handlers)
Sets the request handlers to use in the client. 
 | 
public final AWSCredentialsProvider getCredentials()
public final void setCredentials(AWSCredentialsProvider credentialsProvider)
DefaultAWSCredentialsProviderChain.credentialsProvider - New AWSCredentialsProvider to use.public final Subclass withCredentials(AWSCredentialsProvider credentialsProvider)
DefaultAWSCredentialsProviderChain.credentialsProvider - New AWSCredentialsProvider to use.public final ClientConfiguration getClientConfiguration()
public final void setClientConfiguration(ClientConfiguration config)
PredefinedClientConfigurations.defaultConfig() but may differ per service.config - Custom configuration to usepublic final Subclass withClientConfiguration(ClientConfiguration config)
PredefinedClientConfigurations.defaultConfig() but may differ per service.config - Custom configuration to usepublic final RequestMetricCollector getMetricsCollector()
RequestMetricCollector in use by the builder.public final void setMetricsCollector(RequestMetricCollector metrics)
metrics - Custom RequestMetricCollector to use.public final Subclass withMetricsCollector(RequestMetricCollector metrics)
metrics - Custom RequestMetricCollector to use.public final String getRegion()
public final void setRegion(String region)
setEndpointConfiguration(EndpointConfiguration)
 are explicitly provided in the builder the DEFAULT_REGION_PROVIDER is consulted.region - Region to usepublic final Subclass withRegion(Regions region)
setEndpointConfiguration(EndpointConfiguration)
 are explicitly provided in the builder the DEFAULT_REGION_PROVIDER is consulted.
  For regions not explicitly in the Regions enum use the withRegion(String) overload.
region - Region to usepublic final Subclass withRegion(String region)
setEndpointConfiguration(EndpointConfiguration)
 are explicitly provided in the builder the DEFAULT_REGION_PROVIDER is consulted.region - Region to usepublic final AwsClientBuilder.EndpointConfiguration getEndpoint()
public final void setEndpointConfiguration(AwsClientBuilder.EndpointConfiguration endpointConfiguration)
setRegion(String)
 or endpoint configuration are explicitly provided in the builder the DEFAULT_REGION_PROVIDER is consulted.
 Only use this if using a non-standard service endpoint - the recommended approach for configuring a client is to use setRegion(String)
endpointConfiguration - The endpointConfiguration to usepublic final Subclass withEndpointConfiguration(AwsClientBuilder.EndpointConfiguration endpointConfiguration)
withRegion(String)
 or endpoint configuration are explicitly provided in the builder the DEFAULT_REGION_PROVIDER is consulted.
 Only use this if using a non-standard service endpoint - the recommended approach for configuring a client is to use withRegion(String)
endpointConfiguration - The endpointConfiguration to usepublic final List<RequestHandler2> getRequestHandlers()
public final void setRequestHandlers(RequestHandler2... handlers)
handlers - Request handlers to use for client.public final Subclass withRequestHandlers(RequestHandler2... handlers)
handlers - Request handlers to use for client.public final MonitoringListener getMonitoringListener()
MonitoringListener in use by the builder.public final void setMonitoringListener(MonitoringListener monitoringListener)
monitoringListener - Custom Monitoring Listener to use.public final Subclass withMonitoringListener(MonitoringListener monitoringListener)
monitoringListener - Custom MonitoringListener to use.public CsmConfigurationProvider getClientSideMonitoringConfigurationProvider()
public void setClientSideMonitoringConfigurationProvider(CsmConfigurationProvider csmConfig)
public Subclass withClientSideMonitoringConfigurationProvider(CsmConfigurationProvider csmConfig)
public abstract TypeToBuild build()