
com.amazonaws.services.cognitosync.AmazonCognitoSyncAsync Maven / Gradle / Ivy
/*
* Copyright 2010-2014 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;
import java.util.concurrent.Future;
import com.amazonaws.AmazonClientException;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.handlers.AsyncHandler;
import com.amazonaws.services.cognitosync.model.*;
/**
* Interface for accessing AmazonCognitoSync asynchronously.
* Each asynchronous method will return a Java Future object, and users are also allowed
* to provide a callback handler.
* 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.
*
*/
public interface AmazonCognitoSyncAsync extends AmazonCognitoSync {
/**
*
* Posts updates to records and add and delete records for a dataset and
* user.
*
*
* @param updateRecordsRequest Container for the necessary parameters to
* execute the UpdateRecords operation on AmazonCognitoSync.
*
* @return A Java Future object containing the response from the
* UpdateRecords service method, as returned by AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 updateRecordsAsync(UpdateRecordsRequest updateRecordsRequest)
throws AmazonServiceException, AmazonClientException;
/**
*
* Posts updates to records and add and delete records for a dataset and
* user.
*
*
* @param updateRecordsRequest Container for the necessary parameters to
* execute the UpdateRecords operation on AmazonCognitoSync.
* @param 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.
*
* @return A Java Future object containing the response from the
* UpdateRecords service method, as returned by AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 updateRecordsAsync(UpdateRecordsRequest updateRecordsRequest,
AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
*
* Gets usage details (for example, data storage) about a particular
* identity pool.
*
*
* @param describeIdentityPoolUsageRequest Container for the necessary
* parameters to execute the DescribeIdentityPoolUsage operation on
* AmazonCognitoSync.
*
* @return A Java Future object containing the response from the
* DescribeIdentityPoolUsage service method, as returned by
* AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 describeIdentityPoolUsageAsync(DescribeIdentityPoolUsageRequest describeIdentityPoolUsageRequest)
throws AmazonServiceException, AmazonClientException;
/**
*
* Gets usage details (for example, data storage) about a particular
* identity pool.
*
*
* @param describeIdentityPoolUsageRequest Container for the necessary
* parameters to execute the DescribeIdentityPoolUsage operation on
* AmazonCognitoSync.
* @param 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.
*
* @return A Java Future object containing the response from the
* DescribeIdentityPoolUsage service method, as returned by
* AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 describeIdentityPoolUsageAsync(DescribeIdentityPoolUsageRequest describeIdentityPoolUsageRequest,
AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
*
* Lists datasets for an identity.
*
*
* @param listDatasetsRequest Container for the necessary parameters to
* execute the ListDatasets operation on AmazonCognitoSync.
*
* @return A Java Future object containing the response from the
* ListDatasets service method, as returned by AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 listDatasetsAsync(ListDatasetsRequest listDatasetsRequest)
throws AmazonServiceException, AmazonClientException;
/**
*
* Lists datasets for an identity.
*
*
* @param listDatasetsRequest Container for the necessary parameters to
* execute the ListDatasets operation on AmazonCognitoSync.
* @param 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.
*
* @return A Java Future object containing the response from the
* ListDatasets service method, as returned by AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 listDatasetsAsync(ListDatasetsRequest listDatasetsRequest,
AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
*
* Gets a list of identity pools registered with Cognito.
*
*
* @param listIdentityPoolUsageRequest Container for the necessary
* parameters to execute the ListIdentityPoolUsage operation on
* AmazonCognitoSync.
*
* @return A Java Future object containing the response from the
* ListIdentityPoolUsage service method, as returned by
* AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 listIdentityPoolUsageAsync(ListIdentityPoolUsageRequest listIdentityPoolUsageRequest)
throws AmazonServiceException, AmazonClientException;
/**
*
* Gets a list of identity pools registered with Cognito.
*
*
* @param listIdentityPoolUsageRequest Container for the necessary
* parameters to execute the ListIdentityPoolUsage operation on
* AmazonCognitoSync.
* @param 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.
*
* @return A Java Future object containing the response from the
* ListIdentityPoolUsage service method, as returned by
* AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 listIdentityPoolUsageAsync(ListIdentityPoolUsageRequest listIdentityPoolUsageRequest,
AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
*
* Gets paginated records, optionally changed after a particular sync
* count for a dataset and identity.
*
*
* @param listRecordsRequest Container for the necessary parameters to
* execute the ListRecords operation on AmazonCognitoSync.
*
* @return A Java Future object containing the response from the
* ListRecords service method, as returned by AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 listRecordsAsync(ListRecordsRequest listRecordsRequest)
throws AmazonServiceException, AmazonClientException;
/**
*
* Gets paginated records, optionally changed after a particular sync
* count for a dataset and identity.
*
*
* @param listRecordsRequest Container for the necessary parameters to
* execute the ListRecords operation on AmazonCognitoSync.
* @param 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.
*
* @return A Java Future object containing the response from the
* ListRecords service method, as returned by AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 listRecordsAsync(ListRecordsRequest listRecordsRequest,
AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
*
* Gets metadata about a dataset by identity and dataset name.
*
*
* @param describeDatasetRequest Container for the necessary parameters
* to execute the DescribeDataset operation on AmazonCognitoSync.
*
* @return A Java Future object containing the response from the
* DescribeDataset service method, as returned by AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 describeDatasetAsync(DescribeDatasetRequest describeDatasetRequest)
throws AmazonServiceException, AmazonClientException;
/**
*
* Gets metadata about a dataset by identity and dataset name.
*
*
* @param describeDatasetRequest Container for the necessary parameters
* to execute the DescribeDataset operation on AmazonCognitoSync.
* @param 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.
*
* @return A Java Future object containing the response from the
* DescribeDataset service method, as returned by AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 describeDatasetAsync(DescribeDatasetRequest describeDatasetRequest,
AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
*
* 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
* consequent operation on this dataset will result in a
* ResourceNotFoundException.
*
*
* @param deleteDatasetRequest Container for the necessary parameters to
* execute the DeleteDataset operation on AmazonCognitoSync.
*
* @return A Java Future object containing the response from the
* DeleteDataset service method, as returned by AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 deleteDatasetAsync(DeleteDatasetRequest deleteDatasetRequest)
throws AmazonServiceException, AmazonClientException;
/**
*
* 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
* consequent operation on this dataset will result in a
* ResourceNotFoundException.
*
*
* @param deleteDatasetRequest Container for the necessary parameters to
* execute the DeleteDataset operation on AmazonCognitoSync.
* @param 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.
*
* @return A Java Future object containing the response from the
* DeleteDataset service method, as returned by AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 deleteDatasetAsync(DeleteDatasetRequest deleteDatasetRequest,
AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
*
* Gets usage information for an identity, including number of datasets
* and data usage.
*
*
* @param describeIdentityUsageRequest Container for the necessary
* parameters to execute the DescribeIdentityUsage operation on
* AmazonCognitoSync.
*
* @return A Java Future object containing the response from the
* DescribeIdentityUsage service method, as returned by
* AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 describeIdentityUsageAsync(DescribeIdentityUsageRequest describeIdentityUsageRequest)
throws AmazonServiceException, AmazonClientException;
/**
*
* Gets usage information for an identity, including number of datasets
* and data usage.
*
*
* @param describeIdentityUsageRequest Container for the necessary
* parameters to execute the DescribeIdentityUsage operation on
* AmazonCognitoSync.
* @param 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.
*
* @return A Java Future object containing the response from the
* DescribeIdentityUsage service method, as returned by
* AmazonCognitoSync.
*
*
* @throws 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.
* @throws 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 describeIdentityUsageAsync(DescribeIdentityUsageRequest describeIdentityUsageRequest,
AsyncHandler asyncHandler)
throws AmazonServiceException, AmazonClientException;
}