com.amazonaws.mobileconnectors.cognito
Class PushSyncUpdate

java.lang.Object
  extended by com.amazonaws.mobileconnectors.cognito.PushSyncUpdate

public class PushSyncUpdate
extends java.lang.Object

A class to keep handy the data that is given in a push sync message, for the sake of parsing the message to uniquely identify the dataset for update and use that information to synchronize the local data. This class should only be used with a push sync notification, isPushSyncUpdate(Intent intent) can be used to verify as much.


Method Summary
 java.lang.String getDatasetName()
          Gets the name of the changed datset
 java.lang.String getIdentityId()
          Gets the identity id for which the change was made
 java.lang.String getIdentityPoolId()
          Gets the identity pool in which the user belongs
 java.lang.String getSource()
          Gets the source of the notification, 'cognito-sync' from push sync
 long getSyncCount()
          Gets the sync count of the changed dataset
static boolean isPushSyncUpdate(android.content.Intent intent)
          A helper to determine if the intent in question is one received from Cognito for a push sync update to a dataset.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSource

public java.lang.String getSource()
Gets the source of the notification, 'cognito-sync' from push sync


getIdentityId

public java.lang.String getIdentityId()
Gets the identity id for which the change was made


getIdentityPoolId

public java.lang.String getIdentityPoolId()
Gets the identity pool in which the user belongs


getDatasetName

public java.lang.String getDatasetName()
Gets the name of the changed datset


getSyncCount

public long getSyncCount()
Gets the sync count of the changed dataset


isPushSyncUpdate

public static boolean isPushSyncUpdate(android.content.Intent intent)
A helper to determine if the intent in question is one received from Cognito for a push sync update to a dataset. If there's question, this should be called before creating a push sync object, as if it is not valid, that object will be null.

Parameters:
intent - the intent to check the validity of format of
Returns:
true if it's a push sync update, false if not.


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.