Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
    * 
    * Licensed under the Apache License, Version 2.0 (the "License").
    * You may not use this file except in compliance with the License.
    * A copy of the License is located at
    * 
    *  http://aws.amazon.com/apache2.0
    * 
   * or in the "license" file accompanying this file. This file is distributed
   * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
   * express or implied. See the License for the specific language governing
   * permissions and limitations under the License.
   */
  package com.amazonaws.services.cognitosync;
  
  
  
Asynchronous client for accessing AmazonCognitoSync. All asynchronous calls made using this client are non-blocking. Callers could either process the result and handle the exceptions in the worker thread by providing a callback handler when making the call, or use the returned Future object to check the result of the call in the calling thread. Amazon Cognito Sync

Amazon Cognito Sync provides an AWS service and client library that enable cross-device syncing of application-related user data. High-level client libraries are available for both iOS and Android. You can use these libraries to persist data locally so that it's available even if the device is offline. Developer credentials don't need to be stored on the mobile device to access the service. You can use Amazon Cognito to obtain a normalized user ID and credentials. User data is persisted in a dataset that can store up to 1 MB of key-value pairs, and you can have up to 20 datasets per user identity.

With Amazon Cognito Sync, the data stored for each identity is accessible only to credentials assigned to that identity. In order to use the Cognito Sync service, you need to make API calls using credentials retrieved with Amazon Cognito Identity service .

If you want to use Cognito Sync in an Android or iOS application, you will probably want to make API calls via the AWS Mobile SDK. To learn more, see the Developer Guide for Android and the Developer Guide for iOS .

  
          implements AmazonCognitoSyncAsync {

    
Executor service for executing asynchronous requests.
  
      private ExecutorService executorService;
  
      private static final int DEFAULT_THREAD_POOL_SIZE = 50;

    
Constructs a new asynchronous client to invoke service methods on AmazonCognitoSync. A credentials provider chain will be used that searches for credentials in this order:
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • Instance profile credentials delivered through the Amazon EC2 metadata service

All service calls made using this new client object are blocking, and will not return until the service call completes.

  
      public AmazonCognitoSyncAsyncClient() {
          this(new DefaultAWSCredentialsProviderChain());
      }

    
Constructs a new asynchronous client to invoke service methods on AmazonCognitoSync. A credentials provider chain will be used that searches for credentials in this order:
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • Instance profile credentials delivered through the Amazon EC2 metadata service

All service calls made using this new client object are blocking, and will not return until the service call completes.

Parameters:
clientConfiguration The client configuration options controlling how this client connects to AmazonCognitoSync (ex: proxy settings, retry counts, etc.).
See also:
com.amazonaws.auth.DefaultAWSCredentialsProviderChain
 
     public AmazonCognitoSyncAsyncClient(ClientConfiguration clientConfiguration) {
         this(new DefaultAWSCredentialsProviderChain(), clientConfiguration, Executors.newFixedThreadPool(clientConfiguration.getMaxConnections()));
     }

    
Constructs a new asynchronous client to invoke service methods on AmazonCognitoSync using the specified AWS account credentials. Default client settings will be used, and a fixed size thread pool will be created for executing the asynchronous tasks.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentials The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
 
     public AmazonCognitoSyncAsyncClient(AWSCredentials awsCredentials) {
         this(awsCredentials, Executors.newFixedThreadPool());
     }

    
Constructs a new asynchronous client to invoke service methods on AmazonCognitoSync using the specified AWS account credentials and executor service. Default client settings will be used.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
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 AmazonCognitoSyncAsyncClient(AWSCredentials awsCredentialsExecutorService executorService) {
         super(awsCredentials);
         this. = executorService;
     }

    
Constructs a new asynchronous client to invoke service methods on AmazonCognitoSync using the specified AWS account credentials, executor service, and client configuration options.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
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 AmazonCognitoSyncAsyncClient(AWSCredentials awsCredentials,
                 ClientConfiguration clientConfigurationExecutorService executorService) {
         super(awsCredentialsclientConfiguration);
         this. = executorService;
     }

    
Constructs a new asynchronous client to invoke service methods on AmazonCognitoSync using the specified AWS account credentials provider. Default client settings will be used, and a fixed size thread pool will be created for executing the asynchronous tasks.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
 
     public AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProvider) {
         this(awsCredentialsProvider, Executors.newFixedThreadPool());
     }

    
Constructs a new asynchronous client to invoke service methods on AmazonCognitoSync using the specified AWS account credentials provider and executor service. Default client settings will be used.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
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 AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProviderExecutorService executorService) {
         this(awsCredentialsProvidernew ClientConfiguration(), executorService);
     }

    
Constructs a new asynchronous client to invoke service methods on AmazonCognitoSync using the specified AWS account credentials provider and client configuration options.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
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).
 
     public AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
                 ClientConfiguration clientConfiguration) {
         this(awsCredentialsProviderclientConfiguration, Executors.newFixedThreadPool(clientConfiguration.getMaxConnections()));
     }

    
Constructs a new asynchronous client to invoke service methods on AmazonCognitoSync using the specified AWS account credentials provider, executor service, and client configuration options.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
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 AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
                 ClientConfiguration clientConfigurationExecutorService executorService) {
         super(awsCredentialsProviderclientConfiguration);
         this. = executorService;
     }

    
Returns the executor service used by this async client to execute requests.

Returns:
The executor service used by this async client to execute requests.
 
     public ExecutorService getExecutorService() {
         return ;
     }

    
Shuts down the client, releasing all managed resources. This includes forcibly terminating all pending asynchronous service calls. Clients who wish to give pending asynchronous service calls time to complete should call getExecutorService().shutdown() followed by getExecutorService().awaitTermination() prior to calling this method.
 
     @Override
     public void shutdown() {
         super.shutdown();
         .shutdownNow();
     }
            
    

Posts updates to records and adds and deletes records for a dataset and user.

UpdateRecords can only be called with temporary user credentials provided by Cognito Identity. You cannot make this API call with developer credentials.

Parameters:
updateRecordsRequest Container for the necessary parameters to execute the UpdateRecords operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the UpdateRecords service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
     public Future<UpdateRecordsResultupdateRecordsAsync(final UpdateRecordsRequest updateRecordsRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<UpdateRecordsResult>() {
             public UpdateRecordsResult call() throws Exception {
                 return updateRecords(updateRecordsRequest);
         }
     });
     }

    

Posts updates to records and adds and deletes records for a dataset and user.

UpdateRecords can only be called with temporary user credentials provided by Cognito Identity. You cannot make this API call with developer credentials.

Parameters:
updateRecordsRequest Container for the necessary parameters to execute the UpdateRecords operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the UpdateRecords service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
             final UpdateRecordsRequest updateRecordsRequest,
             final AsyncHandler<UpdateRecordsRequestUpdateRecordsResultasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<UpdateRecordsResult>() {
             public UpdateRecordsResult call() throws Exception {
               UpdateRecordsResult result;
                 try {
                 result = updateRecords(updateRecordsRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(updateRecordsRequestresult);
                  return result;
         }
     });
     }
    
    

Sets the AWS Lambda function for a given event type for an identity pool. This request only updates the key/value pair specified. Other key/values pairs are not updated. To remove a key value pair, pass a empty value for the particular key.

Parameters:
setCognitoEventsRequest Container for the necessary parameters to execute the SetCognitoEvents operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the SetCognitoEvents service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
     public Future<VoidsetCognitoEventsAsync(final SetCognitoEventsRequest setCognitoEventsRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<Void>() {
             public Void call() throws Exception {
                 setCognitoEvents(setCognitoEventsRequest);
                 return null;
         }
     });
     }

    

Sets the AWS Lambda function for a given event type for an identity pool. This request only updates the key/value pair specified. Other key/values pairs are not updated. To remove a key value pair, pass a empty value for the particular key.

Parameters:
setCognitoEventsRequest Container for the necessary parameters to execute the SetCognitoEvents operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the SetCognitoEvents service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
     public Future<VoidsetCognitoEventsAsync(
             final SetCognitoEventsRequest setCognitoEventsRequest,
             final AsyncHandler<SetCognitoEventsRequestVoidasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<Void>() {
             public Void call() throws Exception {
               try {
                 setCognitoEvents(setCognitoEventsRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(setCognitoEventsRequestnull);
                  return null;
         }
     });
     }
    
    

Gets the events and the corresponding Lambda functions associated with an identity pool

Parameters:
getCognitoEventsRequest Container for the necessary parameters to execute the GetCognitoEvents operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the GetCognitoEvents service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
     public Future<GetCognitoEventsResultgetCognitoEventsAsync(final GetCognitoEventsRequest getCognitoEventsRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<GetCognitoEventsResult>() {
             public GetCognitoEventsResult call() throws Exception {
                 return getCognitoEvents(getCognitoEventsRequest);
         }
     });
     }

    

Gets the events and the corresponding Lambda functions associated with an identity pool

Parameters:
getCognitoEventsRequest Container for the necessary parameters to execute the GetCognitoEvents operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the GetCognitoEvents service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
             final GetCognitoEventsRequest getCognitoEventsRequest,
             final AsyncHandler<GetCognitoEventsRequestGetCognitoEventsResultasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<GetCognitoEventsResult>() {
             public GetCognitoEventsResult call() throws Exception {
               GetCognitoEventsResult result;
                 try {
                 result = getCognitoEvents(getCognitoEventsRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(getCognitoEventsRequestresult);
                  return result;
         }
     });
     }
    
    

Gets usage information for an identity, including number of datasets and data usage.

DescribeIdentityUsage can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

Parameters:
describeIdentityUsageRequest Container for the necessary parameters to execute the DescribeIdentityUsage operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the DescribeIdentityUsage service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
     public Future<DescribeIdentityUsageResultdescribeIdentityUsageAsync(final DescribeIdentityUsageRequest describeIdentityUsageRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<DescribeIdentityUsageResult>() {
             public DescribeIdentityUsageResult call() throws Exception {
                 return describeIdentityUsage(describeIdentityUsageRequest);
         }
     });
     }

    

Gets usage information for an identity, including number of datasets and data usage.

DescribeIdentityUsage can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

Parameters:
describeIdentityUsageRequest Container for the necessary parameters to execute the DescribeIdentityUsage operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the DescribeIdentityUsage service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
             final DescribeIdentityUsageRequest describeIdentityUsageRequest,
             final AsyncHandler<DescribeIdentityUsageRequestDescribeIdentityUsageResultasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<DescribeIdentityUsageResult>() {
             public DescribeIdentityUsageResult call() throws Exception {
               DescribeIdentityUsageResult result;
                 try {
                 result = describeIdentityUsage(describeIdentityUsageRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(describeIdentityUsageRequestresult);
                  return result;
         }
     });
     }
    
    

Unsubscribes from receiving notifications when a dataset is modified by another device.

Parameters:
unsubscribeFromDatasetRequest Container for the necessary parameters to execute the UnsubscribeFromDataset operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the UnsubscribeFromDataset service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
     public Future<UnsubscribeFromDatasetResultunsubscribeFromDatasetAsync(final UnsubscribeFromDatasetRequest unsubscribeFromDatasetRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<UnsubscribeFromDatasetResult>() {
             public UnsubscribeFromDatasetResult call() throws Exception {
                 return unsubscribeFromDataset(unsubscribeFromDatasetRequest);
         }
     });
     }

    

Unsubscribes from receiving notifications when a dataset is modified by another device.

Parameters:
unsubscribeFromDatasetRequest Container for the necessary parameters to execute the UnsubscribeFromDataset operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the UnsubscribeFromDataset service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
             final UnsubscribeFromDatasetRequest unsubscribeFromDatasetRequest,
             final AsyncHandler<UnsubscribeFromDatasetRequestUnsubscribeFromDatasetResultasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<UnsubscribeFromDatasetResult>() {
             public UnsubscribeFromDatasetResult call() throws Exception {
               UnsubscribeFromDatasetResult result;
                 try {
                 result = unsubscribeFromDataset(unsubscribeFromDatasetRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(unsubscribeFromDatasetRequestresult);
                  return result;
         }
     });
     }
    
    

Sets the necessary configuration for push sync.

Parameters:
setIdentityPoolConfigurationRequest Container for the necessary parameters to execute the SetIdentityPoolConfiguration operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the SetIdentityPoolConfiguration service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
             throws AmazonServiceExceptionAmazonClientException {
             public SetIdentityPoolConfigurationResult call() throws Exception {
                 return setIdentityPoolConfiguration(setIdentityPoolConfigurationRequest);
         }
     });
     }

    

Sets the necessary configuration for push sync.

Parameters:
setIdentityPoolConfigurationRequest Container for the necessary parameters to execute the SetIdentityPoolConfiguration operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the SetIdentityPoolConfiguration service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
             final SetIdentityPoolConfigurationRequest setIdentityPoolConfigurationRequest,
                     throws AmazonServiceExceptionAmazonClientException {
             public SetIdentityPoolConfigurationResult call() throws Exception {
               SetIdentityPoolConfigurationResult result;
                 try {
                 result = setIdentityPoolConfiguration(setIdentityPoolConfigurationRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(setIdentityPoolConfigurationRequestresult);
                  return result;
         }
     });
     }
    
    

Gets the configuration settings of an identity pool.

Parameters:
getIdentityPoolConfigurationRequest Container for the necessary parameters to execute the GetIdentityPoolConfiguration operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the GetIdentityPoolConfiguration service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
             throws AmazonServiceExceptionAmazonClientException {
             public GetIdentityPoolConfigurationResult call() throws Exception {
                 return getIdentityPoolConfiguration(getIdentityPoolConfigurationRequest);
         }
     });
     }

    

Gets the configuration settings of an identity pool.

Parameters:
getIdentityPoolConfigurationRequest Container for the necessary parameters to execute the GetIdentityPoolConfiguration operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the GetIdentityPoolConfiguration service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
             final GetIdentityPoolConfigurationRequest getIdentityPoolConfigurationRequest,
                     throws AmazonServiceExceptionAmazonClientException {
             public GetIdentityPoolConfigurationResult call() throws Exception {
               GetIdentityPoolConfigurationResult result;
                 try {
                 result = getIdentityPoolConfiguration(getIdentityPoolConfigurationRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(getIdentityPoolConfigurationRequestresult);
                  return result;
         }
     });
     }
    
    

Subscribes to receive notifications when a dataset is modified by another device.

Parameters:
subscribeToDatasetRequest Container for the necessary parameters to execute the SubscribeToDataset operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the SubscribeToDataset service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
     public Future<SubscribeToDatasetResultsubscribeToDatasetAsync(final SubscribeToDatasetRequest subscribeToDatasetRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<SubscribeToDatasetResult>() {
             public SubscribeToDatasetResult call() throws Exception {
                 return subscribeToDataset(subscribeToDatasetRequest);
         }
     });
     }

    

Subscribes to receive notifications when a dataset is modified by another device.

Parameters:
subscribeToDatasetRequest Container for the necessary parameters to execute the SubscribeToDataset operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the SubscribeToDataset service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
             final SubscribeToDatasetRequest subscribeToDatasetRequest,
             final AsyncHandler<SubscribeToDatasetRequestSubscribeToDatasetResultasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<SubscribeToDatasetResult>() {
             public SubscribeToDatasetResult call() throws Exception {
               SubscribeToDatasetResult result;
                 try {
                 result = subscribeToDataset(subscribeToDatasetRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(subscribeToDatasetRequestresult);
                  return result;
         }
     });
     }
    
    

Gets usage details (for example, data storage) about a particular identity pool.

DescribeIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.

Parameters:
describeIdentityPoolUsageRequest Container for the necessary parameters to execute the DescribeIdentityPoolUsage operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the DescribeIdentityPoolUsage service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
             throws AmazonServiceExceptionAmazonClientException {
             public DescribeIdentityPoolUsageResult call() throws Exception {
                 return describeIdentityPoolUsage(describeIdentityPoolUsageRequest);
         }
     });
     }

    

Gets usage details (for example, data storage) about a particular identity pool.

DescribeIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.

Parameters:
describeIdentityPoolUsageRequest Container for the necessary parameters to execute the DescribeIdentityPoolUsage operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the DescribeIdentityPoolUsage service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
 
             final DescribeIdentityPoolUsageRequest describeIdentityPoolUsageRequest,
             final AsyncHandler<DescribeIdentityPoolUsageRequestDescribeIdentityPoolUsageResultasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
             public DescribeIdentityPoolUsageResult call() throws Exception {
               DescribeIdentityPoolUsageResult result;
                try {
                result = describeIdentityPoolUsage(describeIdentityPoolUsageRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(describeIdentityPoolUsageRequestresult);
                 return result;
        }
    });
    }
    
    

Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.

ListDatasets can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito Identity credentials to make this API call.

Parameters:
listDatasetsRequest Container for the necessary parameters to execute the ListDatasets operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the ListDatasets service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
    public Future<ListDatasetsResultlistDatasetsAsync(final ListDatasetsRequest listDatasetsRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<ListDatasetsResult>() {
            public ListDatasetsResult call() throws Exception {
                return listDatasets(listDatasetsRequest);
        }
    });
    }

    

Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.

ListDatasets can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito Identity credentials to make this API call.

Parameters:
listDatasetsRequest Container for the necessary parameters to execute the ListDatasets operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the ListDatasets service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
            final ListDatasetsRequest listDatasetsRequest,
            final AsyncHandler<ListDatasetsRequestListDatasetsResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<ListDatasetsResult>() {
            public ListDatasetsResult call() throws Exception {
              ListDatasetsResult result;
                try {
                result = listDatasets(listDatasetsRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(listDatasetsRequestresult);
                 return result;
        }
    });
    }
    
    

Gets a list of identity pools registered with Cognito.

ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.

Parameters:
listIdentityPoolUsageRequest Container for the necessary parameters to execute the ListIdentityPoolUsage operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the ListIdentityPoolUsage service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
    public Future<ListIdentityPoolUsageResultlistIdentityPoolUsageAsync(final ListIdentityPoolUsageRequest listIdentityPoolUsageRequest
            throws AmazonServiceExceptionAmazonClientException {
            public ListIdentityPoolUsageResult call() throws Exception {
                return listIdentityPoolUsage(listIdentityPoolUsageRequest);
        }
    });
    }

    

Gets a list of identity pools registered with Cognito.

ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.

Parameters:
listIdentityPoolUsageRequest Container for the necessary parameters to execute the ListIdentityPoolUsage operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the ListIdentityPoolUsage service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
            final ListIdentityPoolUsageRequest listIdentityPoolUsageRequest,
            final AsyncHandler<ListIdentityPoolUsageRequestListIdentityPoolUsageResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
            public ListIdentityPoolUsageResult call() throws Exception {
              ListIdentityPoolUsageResult result;
                try {
                result = listIdentityPoolUsage(listIdentityPoolUsageRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(listIdentityPoolUsageRequestresult);
                 return result;
        }
    });
    }
    
    

Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.

ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.

Parameters:
listRecordsRequest Container for the necessary parameters to execute the ListRecords operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the ListRecords service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
    public Future<ListRecordsResultlistRecordsAsync(final ListRecordsRequest listRecordsRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<ListRecordsResult>() {
            public ListRecordsResult call() throws Exception {
                return listRecords(listRecordsRequest);
        }
    });
    }

    

Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.

ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.

Parameters:
listRecordsRequest Container for the necessary parameters to execute the ListRecords operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the ListRecords service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
            final ListRecordsRequest listRecordsRequest,
            final AsyncHandler<ListRecordsRequestListRecordsResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<ListRecordsResult>() {
            public ListRecordsResult call() throws Exception {
              ListRecordsResult result;
                try {
                result = listRecords(listRecordsRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(listRecordsRequestresult);
                 return result;
        }
    });
    }
    
    

Get the status of the last BulkPublish operation for an identity pool.

Parameters:
getBulkPublishDetailsRequest Container for the necessary parameters to execute the GetBulkPublishDetails operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the GetBulkPublishDetails service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
    public Future<GetBulkPublishDetailsResultgetBulkPublishDetailsAsync(final GetBulkPublishDetailsRequest getBulkPublishDetailsRequest
            throws AmazonServiceExceptionAmazonClientException {
            public GetBulkPublishDetailsResult call() throws Exception {
                return getBulkPublishDetails(getBulkPublishDetailsRequest);
        }
    });
    }

    

Get the status of the last BulkPublish operation for an identity pool.

Parameters:
getBulkPublishDetailsRequest Container for the necessary parameters to execute the GetBulkPublishDetails operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the GetBulkPublishDetails service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
            final GetBulkPublishDetailsRequest getBulkPublishDetailsRequest,
            final AsyncHandler<GetBulkPublishDetailsRequestGetBulkPublishDetailsResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
            public GetBulkPublishDetailsResult call() throws Exception {
              GetBulkPublishDetailsResult result;
                try {
                result = getBulkPublishDetails(getBulkPublishDetailsRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(getBulkPublishDetailsRequestresult);
                 return result;
        }
    });
    }
    
    

Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream. Customers are limited to one successful bulk publish per 24 hours. Bulk publish is an asynchronous request, customers can see the status of the request via the GetBulkPublishDetails operation.

Parameters:
bulkPublishRequest Container for the necessary parameters to execute the BulkPublish operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the BulkPublish service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
    public Future<BulkPublishResultbulkPublishAsync(final BulkPublishRequest bulkPublishRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<BulkPublishResult>() {
            public BulkPublishResult call() throws Exception {
                return bulkPublish(bulkPublishRequest);
        }
    });
    }

    

Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream. Customers are limited to one successful bulk publish per 24 hours. Bulk publish is an asynchronous request, customers can see the status of the request via the GetBulkPublishDetails operation.

Parameters:
bulkPublishRequest Container for the necessary parameters to execute the BulkPublish operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the BulkPublish service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
            final BulkPublishRequest bulkPublishRequest,
            final AsyncHandler<BulkPublishRequestBulkPublishResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<BulkPublishResult>() {
            public BulkPublishResult call() throws Exception {
              BulkPublishResult result;
                try {
                result = bulkPublish(bulkPublishRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(bulkPublishRequestresult);
                 return result;
        }
    });
    }
    
    

Gets meta data about a dataset by identity and dataset name. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.

DescribeDataset can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.

Parameters:
describeDatasetRequest Container for the necessary parameters to execute the DescribeDataset operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the DescribeDataset service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
    public Future<DescribeDatasetResultdescribeDatasetAsync(final DescribeDatasetRequest describeDatasetRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<DescribeDatasetResult>() {
            public DescribeDatasetResult call() throws Exception {
                return describeDataset(describeDatasetRequest);
        }
    });
    }

    

Gets meta data about a dataset by identity and dataset name. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.

DescribeDataset can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.

Parameters:
describeDatasetRequest Container for the necessary parameters to execute the DescribeDataset operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the DescribeDataset service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
            final DescribeDatasetRequest describeDatasetRequest,
            final AsyncHandler<DescribeDatasetRequestDescribeDatasetResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<DescribeDatasetResult>() {
            public DescribeDatasetResult call() throws Exception {
              DescribeDatasetResult result;
                try {
                result = describeDataset(describeDatasetRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(describeDatasetRequestresult);
                 return result;
        }
    });
    }
    
    

Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException.

DeleteDataset can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

Parameters:
deleteDatasetRequest Container for the necessary parameters to execute the DeleteDataset operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the DeleteDataset service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
    public Future<DeleteDatasetResultdeleteDatasetAsync(final DeleteDatasetRequest deleteDatasetRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<DeleteDatasetResult>() {
            public DeleteDatasetResult call() throws Exception {
                return deleteDataset(deleteDatasetRequest);
        }
    });
    }

    

Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException.

DeleteDataset can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

Parameters:
deleteDatasetRequest Container for the necessary parameters to execute the DeleteDataset operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the DeleteDataset service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
            final DeleteDatasetRequest deleteDatasetRequest,
            final AsyncHandler<DeleteDatasetRequestDeleteDatasetResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<DeleteDatasetResult>() {
            public DeleteDatasetResult call() throws Exception {
              DeleteDatasetResult result;
                try {
                result = deleteDataset(deleteDatasetRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(deleteDatasetRequestresult);
                 return result;
        }
    });
    }
    
    

Registers a device to receive push sync notifications.

Parameters:
registerDeviceRequest Container for the necessary parameters to execute the RegisterDevice operation on AmazonCognitoSync.
Returns:
A Java Future object containing the response from the RegisterDevice service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
    public Future<RegisterDeviceResultregisterDeviceAsync(final RegisterDeviceRequest registerDeviceRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<RegisterDeviceResult>() {
            public RegisterDeviceResult call() throws Exception {
                return registerDevice(registerDeviceRequest);
        }
    });
    }

    

Registers a device to receive push sync notifications.

Parameters:
registerDeviceRequest Container for the necessary parameters to execute the RegisterDevice operation on AmazonCognitoSync.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the RegisterDevice service method, as returned by AmazonCognitoSync.
Throws:
com.amazonaws.AmazonClientException 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.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonCognitoSync indicating either a problem with the data in the request, or a server side issue.
            final RegisterDeviceRequest registerDeviceRequest,
            final AsyncHandler<RegisterDeviceRequestRegisterDeviceResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<RegisterDeviceResult>() {
            public RegisterDeviceResult call() throws Exception {
              RegisterDeviceResult result;
                try {
                result = registerDevice(registerDeviceRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(registerDeviceRequestresult);
                 return result;
        }
    });
    }
    
}
        
New to GrepCode? Check out our FAQ X