本文整理了Java中com.amazonaws.http.UrlHttpClient.<init>()
方法的一些代码示例,展示了UrlHttpClient.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UrlHttpClient.<init>()
方法的具体详情如下:
包路径:com.amazonaws.http.UrlHttpClient
类名称:UrlHttpClient
方法名:<init>
[英]Constructor.
[中]建造师。
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new AmazonWebServiceClient object using the specified
* configuration.
*
* @param clientConfiguration The client configuration for this client.
*/
protected AmazonWebServiceClient(
final ClientConfiguration clientConfiguration) {
this(clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new AWS client using the specified client configuration
* options (ex: max retry attempts, proxy settings, etc).
*
* @param config Configuration options specifying how this client will
* communicate with AWS (ex: proxy settings, retry count, etc.).
*/
public AmazonHttpClient(ClientConfiguration config) {
this(config, new UrlHttpClient(config));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new Amazon S3 client using the specified AWS credentials and
* client configuration to access Amazon S3.
*
* @param credentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to Amazon S3 (e.g. proxy settings,
* retry counts, etc).
*/
public AmazonS3Client(AWSCredentialsProvider credentialsProvider,
ClientConfiguration clientConfiguration) {
this(credentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on
* AmazonSimpleDB using the specified AWS account credentials
* provider and client configuration options.
*
* <p>
* All service calls made using this new client object are blocking, and will not
* return until the service call completes.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials
* to authenticate requests with AWS services.
* @param clientConfiguration The client configuration options controlling how this
* client connects to AmazonSimpleDB
* (ex: proxy settings, retry counts, etc.).
*/
public AmazonSimpleDBClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on
* AmazonEC2 using the specified AWS account credentials
* provider and client configuration options.
*
* <p>
* All service calls made using this new client object are blocking, and will not
* return until the service call completes.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials
* to authenticate requests with AWS services.
* @param clientConfiguration The client configuration options controlling how this
* client connects to AmazonEC2
* (ex: proxy settings, retry counts, etc.).
*/
public AmazonEC2Client(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on AmazonCloudWatch
* using the specified AWS account credentials provider and client
* configuration options.
* <p>
* If AWS session credentials are passed in, then those credentials will be
* used to authenticate requests. Otherwise, if AWS long-term credentials
* are passed in, then session management will be handled automatically by
* the SDK. Callers are encouraged to use long-term credentials and let the
* SDK handle starting and renewing sessions.
* <p>
* Automatically managed sessions will be shared among all clients that use
* the same credentials and service endpoint. To opt out of this behavior,
* explicitly provide an instance of {@link AWSCredentialsProvider} that
* returns {@link AWSSessionCredentials}.
* <p>
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonCloudWatch (ex: proxy
* settings, retry counts, etc.).
*/
public AmazonCloudWatchClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on AmazonPolly using
* the specified AWS account credentials provider and client configuration
* options.
* <p>
* If AWS session credentials are passed in, then those credentials will be
* used to authenticate requests. Otherwise, if AWS long-term credentials
* are passed in, then session management will be handled automatically by
* the SDK. Callers are encouraged to use long-term credentials and let the
* SDK handle starting and renewing sessions.
* <p>
* Automatically managed sessions will be shared among all clients that use
* the same credentials and service endpoint. To opt out of this behavior,
* explicitly provide an instance of {@link AWSCredentialsProvider} that
* returns {@link AWSSessionCredentials}.
* <p>
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonPolly (ex: proxy settings,
* retry counts, etc.).
*/
public AmazonPollyClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on
* AmazonMachineLearning using the specified AWS account credentials
* provider and client configuration options.
* <p>
* If AWS session credentials are passed in, then those credentials will be
* used to authenticate requests. Otherwise, if AWS long-term credentials
* are passed in, then session management will be handled automatically by
* the SDK. Callers are encouraged to use long-term credentials and let the
* SDK handle starting and renewing sessions.
* <p>
* Automatically managed sessions will be shared among all clients that use
* the same credentials and service endpoint. To opt out of this behavior,
* explicitly provide an instance of {@link AWSCredentialsProvider} that
* returns {@link AWSSessionCredentials}.
* <p>
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonMachineLearning (ex: proxy
* settings, retry counts, etc.).
*/
public AmazonMachineLearningClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new AmazonWebServiceClient object using the specified
* configuration and request metric collector.
*
* @param clientConfiguration The client configuration for this client.
* @param requestMetricCollector optional request metric collector to be
* used at the http client level; can be null.
*/
@Deprecated
protected AmazonWebServiceClient(
final ClientConfiguration clientConfiguration,
final RequestMetricCollector requestMetricCollector) {
this(clientConfiguration, new UrlHttpClient(clientConfiguration), null);
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on AWSKMS using the
* specified AWS account credentials provider and client configuration
* options.
* <p>
* If AWS session credentials are passed in, then those credentials will be
* used to authenticate requests. Otherwise, if AWS long-term credentials
* are passed in, then session management will be handled automatically by
* the SDK. Callers are encouraged to use long-term credentials and let the
* SDK handle starting and renewing sessions.
* <p>
* Automatically managed sessions will be shared among all clients that use
* the same credentials and service endpoint. To opt out of this behavior,
* explicitly provide an instance of {@link AWSCredentialsProvider} that
* returns {@link AWSSessionCredentials}.
* <p>
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AWSKMS (ex: proxy settings, retry
* counts, etc.).
*/
public AWSKMSClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on AWSIotData using the
* specified AWS account credentials provider and client configuration
* options.
* <p>
* If AWS session credentials are passed in, then those credentials will be
* used to authenticate requests. Otherwise, if AWS long-term credentials
* are passed in, then session management will be handled automatically by
* the SDK. Callers are encouraged to use long-term credentials and let the
* SDK handle starting and renewing sessions.
* <p>
* Automatically managed sessions will be shared among all clients that use
* the same credentials and service endpoint. To opt out of this behavior,
* explicitly provide an instance of {@link AWSCredentialsProvider} that
* returns {@link AWSSessionCredentials}.
* <p>
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AWSIotData (ex: proxy settings,
* retry counts, etc.).
*/
public AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on AmazonTranscribe
* using the specified AWS account credentials provider and client
* configuration options.
* <p>
* If AWS session credentials are passed in, then those credentials will be
* used to authenticate requests. Otherwise, if AWS long-term credentials
* are passed in, then session management will be handled automatically by
* the SDK. Callers are encouraged to use long-term credentials and let the
* SDK handle starting and renewing sessions.
* <p>
* Automatically managed sessions will be shared among all clients that use
* the same credentials and service endpoint. To opt out of this behavior,
* explicitly provide an instance of {@link AWSCredentialsProvider} that
* returns {@link AWSSessionCredentials}.
* <p>
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonTranscribe (ex: proxy
* settings, retry counts, etc.).
*/
public AmazonTranscribeClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on AmazonRekognition
* using the specified AWS account credentials provider and client
* configuration options.
* <p>
* If AWS session credentials are passed in, then those credentials will be
* used to authenticate requests. Otherwise, if AWS long-term credentials
* are passed in, then session management will be handled automatically by
* the SDK. Callers are encouraged to use long-term credentials and let the
* SDK handle starting and renewing sessions.
* <p>
* Automatically managed sessions will be shared among all clients that use
* the same credentials and service endpoint. To opt out of this behavior,
* explicitly provide an instance of {@link AWSCredentialsProvider} that
* returns {@link AWSSessionCredentials}.
* <p>
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonRekognition (ex: proxy
* settings, retry counts, etc.).
*/
public AmazonRekognitionClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on AWSIot using the
* specified AWS account credentials provider and client configuration
* options.
* <p>
* If AWS session credentials are passed in, then those credentials will be
* used to authenticate requests. Otherwise, if AWS long-term credentials
* are passed in, then session management will be handled automatically by
* the SDK. Callers are encouraged to use long-term credentials and let the
* SDK handle starting and renewing sessions.
* <p>
* Automatically managed sessions will be shared among all clients that use
* the same credentials and service endpoint. To opt out of this behavior,
* explicitly provide an instance of {@link AWSCredentialsProvider} that
* returns {@link AWSSessionCredentials}.
* <p>
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AWSIot (ex: proxy settings, retry
* counts, etc.).
*/
public AWSIotClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on AmazonSNS using the
* specified AWS account credentials provider and client configuration
* options.
* <p>
* If AWS session credentials are passed in, then those credentials will be
* used to authenticate requests. Otherwise, if AWS long-term credentials
* are passed in, then session management will be handled automatically by
* the SDK. Callers are encouraged to use long-term credentials and let the
* SDK handle starting and renewing sessions.
* <p>
* Automatically managed sessions will be shared among all clients that use
* the same credentials and service endpoint. To opt out of this behavior,
* explicitly provide an instance of {@link AWSCredentialsProvider} that
* returns {@link AWSSessionCredentials}.
* <p>
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonSNS (ex: proxy settings,
* retry counts, etc.).
*/
public AmazonSNSClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new client to invoke service methods on AmazonAutoScaling
* using the specified AWS account credentials provider and client
* configuration options.
* <p>
* If AWS session credentials are passed in, then those credentials will be
* used to authenticate requests. Otherwise, if AWS long-term credentials
* are passed in, then session management will be handled automatically by
* the SDK. Callers are encouraged to use long-term credentials and let the
* SDK handle starting and renewing sessions.
* <p>
* Automatically managed sessions will be shared among all clients that use
* the same credentials and service endpoint. To opt out of this behavior,
* explicitly provide an instance of {@link AWSCredentialsProvider} that
* returns {@link AWSSessionCredentials}.
* <p>
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonAutoScaling (ex: proxy
* settings, retry counts, etc.).
*/
public AmazonAutoScalingClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new AWS client using the specified client configuration
* options (ex: max retry attempts, proxy settings, etc), and request metric
* collector.
*
* @param config Configuration options specifying how this client will
* communicate with AWS (ex: proxy settings, retry count, etc.).
* @param requestMetricCollector client specific request metric collector,
* which takes precedence over the one at the AWS SDK level; or
* null if there is none.
*/
@Deprecated
public AmazonHttpClient(ClientConfiguration config,
RequestMetricCollector requestMetricCollector) {
this(config, new UrlHttpClient(config), requestMetricCollector);
}
代码示例来源:origin: aws-amplify/aws-sdk-android
ApiClientHandler(String endpoint, String apiName,
Signer signer, AWSCredentialsProvider provider, String apiKey,
ClientConfiguration clientConfiguration) {
this.endpoint = endpoint;
this.apiName = apiName;
this.signer = signer;
this.provider = provider;
this.apiKey = apiKey;
this.clientConfiguration = clientConfiguration;
client = new UrlHttpClient(this.clientConfiguration);
requestFactory = new HttpRequestFactory();
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Constructs a new Amazon S3 client using the specified AWS credentials,
* client configuration and request metric collector to access Amazon S3.
*
* @param credentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to Amazon S3 (e.g. proxy settings,
* retry counts, etc).
* @param requestMetricCollector request metric collector
*/
@Deprecated
public AmazonS3Client(AWSCredentialsProvider credentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector) {
super(clientConfiguration, new UrlHttpClient(clientConfiguration),
requestMetricCollector);
this.awsCredentialsProvider = credentialsProvider;
init();
}
代码示例来源:origin: aws-amplify/aws-sdk-android
@Test
public void testDeprecatedConstructors() {
ClientConfiguration conf = new ClientConfiguration();
RequestMetricCollector rmc = RequestMetricCollector.NONE;
AmazonHttpClient defaultToUrlClient = new AmazonHttpClient(conf, rmc);
assertTrue(defaultToUrlClient.httpClient instanceof UrlHttpClient);
assertSame(defaultToUrlClient.config, conf);
UrlHttpClient urlClient = new UrlHttpClient(conf);
AmazonHttpClient deprecatedSpecifiedConstrucotr = new AmazonHttpClient(conf, urlClient, rmc);
assertSame(deprecatedSpecifiedConstrucotr.config, conf);
assertSame(deprecatedSpecifiedConstrucotr.httpClient, urlClient);
}
内容来源于网络,如有侵权,请联系作者删除!