@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AWSIotDataAsyncClient extends AWSIotDataClient implements AWSIotDataAsync
AsyncHandler
can be used to receive
notification when an asynchronous operation completes.
IoT data enables secure, bi-directional communication between Internet-connected things (such as sensors, actuators, embedded devices, or smart appliances) and the Amazon Web Services cloud. It implements a broker for applications and things to publish messages over HTTP (Publish) and retrieve, update, and delete shadows. A shadow is a persistent representation of your things and their state in the Amazon Web Services cloud.
Find the endpoint address for actions in IoT data by running this CLI command:
aws iot describe-endpoint --endpoint-type iot:Data-ATS
The service name used by Amazon Web ServicesSignature Version 4 to sign requests is: iotdevicegateway.
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
Constructor and Description |
---|
AWSIotDataAsyncClient()
Deprecated.
|
AWSIotDataAsyncClient(AWSCredentials awsCredentials)
Deprecated.
|
AWSIotDataAsyncClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration,
ExecutorService executorService)
|
AWSIotDataAsyncClient(AWSCredentials awsCredentials,
ExecutorService executorService)
|
AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Deprecated.
|
AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
|
AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
ExecutorService executorService)
|
AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ExecutorService executorService)
|
AWSIotDataAsyncClient(ClientConfiguration clientConfiguration)
Deprecated.
|
builder, deleteThingShadow, getCachedResponseMetadata, getRetainedMessage, getThingShadow, listNamedShadowsForThing, listRetainedMessages, publish, updateThingShadow
addRequestHandler, addRequestHandler, configureRegion, getClientConfiguration, getEndpointPrefix, getMonitoringListeners, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withEndpoint, withRegion, withRegion, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deleteThingShadow, getCachedResponseMetadata, getRetainedMessage, getThingShadow, listNamedShadowsForThing, listRetainedMessages, publish, setEndpoint, setRegion, updateThingShadow
@Deprecated public AWSIotDataAsyncClient()
AWSIotDataAsyncClientBuilder.defaultClient()
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).
@Deprecated public AWSIotDataAsyncClient(ClientConfiguration clientConfiguration)
AwsClientBuilder.withClientConfiguration(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)
@Deprecated public AWSIotDataAsyncClient(AWSCredentials awsCredentials)
AwsClientBuilder.withCredentials(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).
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.Executors.newFixedThreadPool(int)
@Deprecated public AWSIotDataAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
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.@Deprecated public AWSIotDataAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
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.@Deprecated public AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
AwsClientBuilder.withCredentials(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)
@Deprecated public AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(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)
@Deprecated public AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
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.@Deprecated public AWSIotDataAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
and
AwsAsyncClientBuilder.withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)
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 static AWSIotDataAsyncClientBuilder asyncBuilder()
public ExecutorService getExecutorService()
public Future<DeleteThingShadowResult> deleteThingShadowAsync(DeleteThingShadowRequest request)
AWSIotDataAsync
Deletes the shadow for the specified thing.
Requires permission to access the DeleteThingShadow action.
For more information, see DeleteThingShadow in the 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 shadow for the specified thing.
Requires permission to access the DeleteThingShadow action.
For more information, see DeleteThingShadow in the 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<GetRetainedMessageResult> getRetainedMessageAsync(GetRetainedMessageRequest request)
AWSIotDataAsync
Gets the details of a single retained message for the specified topic.
This action returns the message payload of the retained message, which can incur messaging costs. To list only the topic names of the retained messages, call ListRetainedMessages.
Requires permission to access the GetRetainedMessage action.
For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.
getRetainedMessageAsync
in interface AWSIotDataAsync
request
- The input for the GetRetainedMessage operation.public Future<GetRetainedMessageResult> getRetainedMessageAsync(GetRetainedMessageRequest request, AsyncHandler<GetRetainedMessageRequest,GetRetainedMessageResult> asyncHandler)
AWSIotDataAsync
Gets the details of a single retained message for the specified topic.
This action returns the message payload of the retained message, which can incur messaging costs. To list only the topic names of the retained messages, call ListRetainedMessages.
Requires permission to access the GetRetainedMessage action.
For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.
getRetainedMessageAsync
in interface AWSIotDataAsync
request
- The input for the GetRetainedMessage 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 shadow for the specified thing.
Requires permission to access the GetThingShadow action.
For more information, see GetThingShadow in the 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 shadow for the specified thing.
Requires permission to access the GetThingShadow action.
For more information, see GetThingShadow in the 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<ListNamedShadowsForThingResult> listNamedShadowsForThingAsync(ListNamedShadowsForThingRequest request)
AWSIotDataAsync
Lists the shadows for the specified thing.
Requires permission to access the ListNamedShadowsForThing action.
listNamedShadowsForThingAsync
in interface AWSIotDataAsync
public Future<ListNamedShadowsForThingResult> listNamedShadowsForThingAsync(ListNamedShadowsForThingRequest request, AsyncHandler<ListNamedShadowsForThingRequest,ListNamedShadowsForThingResult> asyncHandler)
AWSIotDataAsync
Lists the shadows for the specified thing.
Requires permission to access the ListNamedShadowsForThing action.
listNamedShadowsForThingAsync
in interface AWSIotDataAsync
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<ListRetainedMessagesResult> listRetainedMessagesAsync(ListRetainedMessagesRequest request)
AWSIotDataAsync
Lists summary information about the retained messages stored for the account.
This action returns only the topic names of the retained messages. It doesn't return any message payloads. Although this action doesn't return a message payload, it can still incur messaging costs.
To get the message payload of a retained message, call GetRetainedMessage with the topic name of the retained message.
Requires permission to access the ListRetainedMessages action.
For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.
listRetainedMessagesAsync
in interface AWSIotDataAsync
public Future<ListRetainedMessagesResult> listRetainedMessagesAsync(ListRetainedMessagesRequest request, AsyncHandler<ListRetainedMessagesRequest,ListRetainedMessagesResult> asyncHandler)
AWSIotDataAsync
Lists summary information about the retained messages stored for the account.
This action returns only the topic names of the retained messages. It doesn't return any message payloads. Although this action doesn't return a message payload, it can still incur messaging costs.
To get the message payload of a retained message, call GetRetainedMessage with the topic name of the retained message.
Requires permission to access the ListRetainedMessages action.
For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.
listRetainedMessagesAsync
in interface AWSIotDataAsync
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<PublishResult> publishAsync(PublishRequest request)
AWSIotDataAsync
Publishes an MQTT message.
Requires permission to access the Publish action.
For more information about MQTT messages, see MQTT Protocol in the IoT Developer Guide.
For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.
publishAsync
in interface AWSIotDataAsync
request
- The input for the Publish operation.public Future<PublishResult> publishAsync(PublishRequest request, AsyncHandler<PublishRequest,PublishResult> asyncHandler)
AWSIotDataAsync
Publishes an MQTT message.
Requires permission to access the Publish action.
For more information about MQTT messages, see MQTT Protocol in the IoT Developer Guide.
For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.
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 shadow for the specified thing.
Requires permission to access the UpdateThingShadow action.
For more information, see UpdateThingShadow in the 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 shadow for the specified thing.
Requires permission to access the UpdateThingShadow action.
For more information, see UpdateThingShadow in the 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 AWSIotDataClient