public class AWSIotDataClient extends AmazonWebServiceClient implements AWSIotData
AWS IoT
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.
| Modifier and Type | Field and Description |
|---|---|
protected List<com.amazonaws.transform.JsonErrorUnmarshaller> |
jsonErrorUnmarshallers
List of exception unmarshallers for all AWSIotData exceptions.
|
client, clientConfiguration, endpoint, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffset| Constructor and Description |
|---|
AWSIotDataClient()
Deprecated.
|
AWSIotDataClient(AWSCredentials awsCredentials)
Constructs a new client to invoke service methods on
AWSIotData using the specified AWS account credentials.
|
AWSIotDataClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on
AWSIotData using the specified AWS account credentials
and client configuration options.
|
AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new client to invoke service methods on
AWSIotData using the specified AWS account credentials provider.
|
AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on
AWSIotData using the specified AWS account credentials
provider and client configuration options.
|
AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
HttpClient httpClient)
Constructs a new client to invoke service methods on
AWSIotData using the specified AWS account credentials
provider, client configuration options and request metric collector.
|
AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector)
Deprecated.
|
AWSIotDataClient(ClientConfiguration clientConfiguration)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
DeleteThingShadowResult |
deleteThingShadow(DeleteThingShadowRequest deleteThingShadowRequest)
Deletes the thing shadow for the specified thing.
|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Deprecated.
ResponseMetadata cache can hold up to 50 requests and
responses in memory and will cause memory issue. This method
now always returns null.
|
GetThingShadowResult |
getThingShadow(GetThingShadowRequest getThingShadowRequest)
Gets the thing shadow for the specified thing.
|
void |
publish(PublishRequest publishRequest)
Publishes state information.
|
void |
setEndpoint(String endpoint)
Overrides the default endpoint for this client ("https://data.iot.us-east-1.amazonaws.com").
|
void |
setEndpoint(String endpoint,
String serviceName,
String regionId) |
UpdateThingShadowResult |
updateThingShadow(UpdateThingShadowRequest updateThingShadowRequest)
Updates the thing shadow for the specified thing.
|
addRequestHandler, addRequestHandler, configSigner, configSigner, createExecutionContext, createExecutionContext, createExecutionContext, endClientExecution, endClientExecution, findRequestMetricCollector, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, removeRequestHandler, removeRequestHandler, requestMetricCollector, setConfiguration, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withTimeOffsetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetRegion, shutdownprotected List<com.amazonaws.transform.JsonErrorUnmarshaller> jsonErrorUnmarshallers
@Deprecated public AWSIotDataClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain@Deprecated public AWSIotDataClient(ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
clientConfiguration - The client configuration options controlling how this
client connects to AWSIotData
(ex: proxy settings, retry counts, etc.).DefaultAWSCredentialsProviderChainpublic AWSIotDataClient(AWSCredentials awsCredentials)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials - The AWS credentials (access key ID and secret key) to use
when authenticating with AWS services.public AWSIotDataClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials - The AWS credentials (access key ID and secret key) to use
when authenticating with AWS services.clientConfiguration - The client configuration options controlling how this
client connects to AWSIotData
(ex: proxy settings, retry counts, etc.).public AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider - The AWS credentials provider which will provide credentials
to authenticate requests with AWS services.public AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider - The AWS credentials provider which will provide credentials
to authenticate requests with AWS services.clientConfiguration - The client configuration options controlling how this
client connects to AWSIotData
(ex: proxy settings, retry counts, etc.).@Deprecated public AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider - The AWS credentials provider which will provide credentials
to authenticate requests with AWS services.clientConfiguration - The client configuration options controlling how this
client connects to AWSIotData
(ex: proxy settings, retry counts, etc.).requestMetricCollector - optional request metric collectorpublic AWSIotDataClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, HttpClient httpClient)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider - The AWS credentials provider which will provide credentials
to authenticate requests with AWS services.clientConfiguration - The client configuration options controlling how this
client connects to AWSIotData
(ex: proxy settings, retry counts, etc.).httpClient - A http clientpublic UpdateThingShadowResult updateThingShadow(UpdateThingShadowRequest updateThingShadowRequest)
Updates the thing shadow for the specified thing.
For more information, see UpdateThingShadow in the AWS IoT Developer Guide .
updateThingShadow in interface AWSIotDataupdateThingShadowRequest - Container for the necessary parameters
to execute the UpdateThingShadow service method on AWSIotData.ConflictExceptionMethodNotAllowedExceptionServiceUnavailableExceptionRequestEntityTooLargeExceptionThrottlingExceptionInternalFailureExceptionUnsupportedDocumentEncodingExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIotData indicating
either a problem with the data in the request, or a server side issue.public void publish(PublishRequest publishRequest)
Publishes state information.
For more information, see HTTP Protocol in the AWS IoT Developer Guide .
publish in interface AWSIotDatapublishRequest - Container for the necessary parameters to
execute the Publish service method on AWSIotData.MethodNotAllowedExceptionInternalFailureExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIotData indicating
either a problem with the data in the request, or a server side issue.public DeleteThingShadowResult deleteThingShadow(DeleteThingShadowRequest deleteThingShadowRequest)
Deletes the thing shadow for the specified thing.
For more information, see DeleteThingShadow in the AWS IoT Developer Guide .
deleteThingShadow in interface AWSIotDatadeleteThingShadowRequest - Container for the necessary parameters
to execute the DeleteThingShadow service method on AWSIotData.MethodNotAllowedExceptionResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionUnsupportedDocumentEncodingExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIotData indicating
either a problem with the data in the request, or a server side issue.public GetThingShadowResult getThingShadow(GetThingShadowRequest getThingShadowRequest)
Gets the thing shadow for the specified thing.
For more information, see GetThingShadow in the AWS IoT Developer Guide .
getThingShadow in interface AWSIotDatagetThingShadowRequest - Container for the necessary parameters to
execute the GetThingShadow service method on AWSIotData.MethodNotAllowedExceptionResourceNotFoundExceptionServiceUnavailableExceptionThrottlingExceptionInternalFailureExceptionUnsupportedDocumentEncodingExceptionInvalidRequestExceptionUnauthorizedExceptionAmazonClientException - If any internal errors are encountered inside the client while
attempting to make the request or handle the response. For example
if a network connection is not available.AmazonServiceException - If an error response is returned by AWSIotData indicating
either a problem with the data in the request, or a server side issue.public void setEndpoint(String endpoint)
AWSIotData
Callers can pass in just the endpoint (ex: "data.iot.us-east-1.amazonaws.com") or a full
URL, including the protocol (ex: "https://data.iot.us-east-1.amazonaws.com"). If the
protocol is not specified here, the default protocol from this client's
ClientConfiguration will be used, which by default is HTTPS.
For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912
This method is not threadsafe. An endpoint should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
setEndpoint in interface AWSIotDatasetEndpoint in class AmazonWebServiceClientendpoint - The endpoint (ex: "data.iot.us-east-1.amazonaws.com") or a full URL,
including the protocol (ex: "https://data.iot.us-east-1.amazonaws.com") of
the region specific AWS endpoint this client will communicate
with.public void setEndpoint(String endpoint, String serviceName, String regionId) throws IllegalArgumentException
setEndpoint in class AmazonWebServiceClientIllegalArgumentException@Deprecated public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing the request.
getCachedResponseMetadata in interface AWSIotDatarequest - The originally executed requestCopyright © 2016. All rights reserved.