public class AWSIotDataAsyncClient extends AWSIotDataClient implements AWSIotDataAsync
AsyncHandler
can be used to
receive notification when an asynchronous operation completes.
AWS IoT is considered a beta service as defined in the Service Terms
AWS IoT-Data enables secure, bi-directional communication between Internet-connected things (such as sensors, actuators, embedded devices, or smart appliances) and the AWS cloud. It implements a broker for applications and things to publish messages over HTTP (Publish) and retrieve, update, and delete thing shadows. A thing shadow is a persistent representation of your things and their state in the AWS cloud.
jsonErrorUnmarshallers
client, clientConfiguration, endpoint, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffset
Constructor and Description |
---|
AWSIotDataAsyncClient()
Constructs a new asynchronous client to invoke service methods on AWS IoT
Data Plane.
|
AWSIotDataAsyncClient(AWSCredentials awsCredentials)
Constructs a new asynchronous client to invoke service methods on AWS IoT
Data Plane using the specified AWS account credentials.
|
AWSIotDataAsyncClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration,
ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS IoT
Data Plane using the specified AWS account credentials, executor service,
and client configuration options.
|
AWSIotDataAsyncClient(AWSCredentials awsCredentials,
ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS IoT
Data Plane using the specified AWS account credentials and executor
service.
|
AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new asynchronous client to invoke service methods on AWS IoT
Data Plane using the specified AWS account credentials provider.
|
AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on AWS IoT
Data Plane using the provided AWS account credentials provider and client
configuration options.
|
AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS IoT
Data Plane using the specified AWS account credentials provider, executor
service, and client configuration options.
|
AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on AWS IoT
Data Plane using the specified AWS account credentials provider and
executor service.
|
AWSIotDataAsyncClient(ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on AWS IoT
Data Plane.
|
deleteThingShadow, getCachedResponseMetadata, getThingShadow, publish, updateThingShadow
addRequestHandler, addRequestHandler, beforeMarshalling, configSigner, configSigner, configureRegion, createExecutionContext, createExecutionContext, createExecutionContext, endClientExecution, endClientExecution, findRequestMetricCollector, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, removeRequestHandler, removeRequestHandler, requestMetricCollector, setEndpoint, setEndpoint, setEndpointPrefix, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withEndpoint, withRegion, withRegion, withTimeOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deleteThingShadow, getCachedResponseMetadata, getThingShadow, publish, setEndpoint, setRegion, updateThingShadow
public AWSIotDataAsyncClient()
Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
public AWSIotDataAsyncClient(ClientConfiguration clientConfiguration)
Asynchronous methods are delegated to a fixed-size thread pool containing
a number of threads equal to the maximum number of concurrent connections
configured via ClientConfiguration.getMaxConnections()
.
clientConfiguration
- The client configuration options controlling how this client
connects to AWS IoT Data Plane (ex: proxy settings, retry counts,
etc).DefaultAWSCredentialsProviderChain
,
Executors.newFixedThreadPool(int)
public AWSIotDataAsyncClient(AWSCredentials awsCredentials)
Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
awsCredentials
- The AWS credentials (access key ID and secret key) to use when
authenticating with AWS services.Executors.newFixedThreadPool(int)
public AWSIotDataAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService)
awsCredentials
- The AWS credentials (access key ID and secret key) to use when
authenticating with AWS services.executorService
- The executor service by which all asynchronous requests will be
executed.public AWSIotDataAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService)
awsCredentials
- The AWS credentials (access key ID and secret key) to use when
authenticating with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings,
etc).executorService
- The executor service by which all asynchronous requests will be
executed.public AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to
authenticate requests with AWS services.Executors.newFixedThreadPool(int)
public AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
Asynchronous methods are delegated to a fixed-size thread pool containing
a number of threads equal to the maximum number of concurrent connections
configured via ClientConfiguration.getMaxConnections()
.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to
authenticate requests with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings,
etc).DefaultAWSCredentialsProviderChain
,
Executors.newFixedThreadPool(int)
public AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService)
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to
authenticate requests with AWS services.executorService
- The executor service by which all asynchronous requests will be
executed.public AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService)
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to
authenticate requests with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings,
etc).executorService
- The executor service by which all asynchronous requests will be
executed.public ExecutorService getExecutorService()
public Future<DeleteThingShadowResult> deleteThingShadowAsync(DeleteThingShadowRequest request)
AWSIotDataAsync
Deletes the thing shadow for the specified thing.
For more information, see DeleteThingShadow in the AWS IoT Developer Guide.
deleteThingShadowAsync
in interface AWSIotDataAsync
request
- The input for the DeleteThingShadow operation.public Future<DeleteThingShadowResult> deleteThingShadowAsync(DeleteThingShadowRequest request, AsyncHandler<DeleteThingShadowRequest,DeleteThingShadowResult> asyncHandler)
AWSIotDataAsync
Deletes the thing shadow for the specified thing.
For more information, see DeleteThingShadow in the AWS IoT Developer Guide.
deleteThingShadowAsync
in interface AWSIotDataAsync
request
- The input for the DeleteThingShadow operation.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<GetThingShadowResult> getThingShadowAsync(GetThingShadowRequest request)
AWSIotDataAsync
Gets the thing shadow for the specified thing.
For more information, see GetThingShadow in the AWS IoT Developer Guide.
getThingShadowAsync
in interface AWSIotDataAsync
request
- The input for the GetThingShadow operation.public Future<GetThingShadowResult> getThingShadowAsync(GetThingShadowRequest request, AsyncHandler<GetThingShadowRequest,GetThingShadowResult> asyncHandler)
AWSIotDataAsync
Gets the thing shadow for the specified thing.
For more information, see GetThingShadow in the AWS IoT Developer Guide.
getThingShadowAsync
in interface AWSIotDataAsync
request
- The input for the GetThingShadow operation.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<Void> publishAsync(PublishRequest request)
AWSIotDataAsync
Publishes state information.
For more information, see HTTP Protocol in the AWS IoT Developer Guide.
publishAsync
in interface AWSIotDataAsync
request
- The input for the Publish operation.public Future<Void> publishAsync(PublishRequest request, AsyncHandler<PublishRequest,Void> asyncHandler)
AWSIotDataAsync
Publishes state information.
For more information, see HTTP Protocol in the AWS IoT Developer Guide.
publishAsync
in interface AWSIotDataAsync
request
- The input for the Publish operation.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public Future<UpdateThingShadowResult> updateThingShadowAsync(UpdateThingShadowRequest request)
AWSIotDataAsync
Updates the thing shadow for the specified thing.
For more information, see UpdateThingShadow in the AWS IoT Developer Guide.
updateThingShadowAsync
in interface AWSIotDataAsync
request
- The input for the UpdateThingShadow operation.public Future<UpdateThingShadowResult> updateThingShadowAsync(UpdateThingShadowRequest request, AsyncHandler<UpdateThingShadowRequest,UpdateThingShadowResult> asyncHandler)
AWSIotDataAsync
Updates the thing shadow for the specified thing.
For more information, see UpdateThingShadow in the AWS IoT Developer Guide.
updateThingShadowAsync
in interface AWSIotDataAsync
request
- The input for the UpdateThingShadow operation.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the
request. Users can provide an implementation of the callback
methods in this interface to receive notification of successful or
unsuccessful completion of the operation.public void shutdown()
getExecutorService().shutdown()
followed by
getExecutorService().awaitTermination()
prior to calling this
method.shutdown
in interface AWSIotData
shutdown
in class AmazonWebServiceClient
Copyright © 2015. All rights reserved.