Android Open Source - uppidy-android-sdk Message Provider






From Project

Back to project page uppidy-android-sdk.

License

The source code is released under:

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCT...

If you think the Android project uppidy-android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/**
 * Copyright (C) Uppidy Inc, 2012//from   w w  w  .  j  a v  a 2  s .  c o  m
 */
package com.uppidy.android.sdk.backup;

import com.uppidy.android.sdk.api.ApiSync;

/**
 * @author Vyacheslav Mukhortov
 * Interface class for message providers used by {@link BackupService} to retrieve the messages to be backed up
 */
public interface MessageProvider
{
  /**
   * Iterator method, returns {@link ApiSync} object containing the next portion of {@link ApiMessage}s 
   * and {@link ApiContact}s to be backed up.
   * Implementor may return {@link ApiSync} with an empty list of messages or null to indicate 
   * that there is nothing to backup.
   * It seems a good idea to return a limited number of messages, especially MMS.
   * @return - {@link ApiSync} object to be backed up
   */
  public ApiSync getNextSyncBundle();
    
  /**
   * Must return the container id used by Uppidy server to keep messages of the type provided by this {@link MessageProvider}.
   * @return String - Uppidy container ID
   */
  public String getContainerId();
  
  /**
   * This method will be called by {@link BackupService} if and only if the last {@link ApiSync} object retrieved from
   * {@code getNextSyncBundle()} is successfully backed up.
   * Implementor must remember the messages backed up (remove them from database or mark as backed up) and 
   * do not return those messages on subsequent {@code getNextSyncBundle()} calls. 
   * @param sync - ApiSync object being backed up
   */
  public void backupDone( ApiSync sync );  
  
}




Java Source Code List

com.uppidy.android.sdk.api.ApiAppInfo.java
com.uppidy.android.sdk.api.ApiBodyPartResource.java
com.uppidy.android.sdk.api.ApiBodyPart.java
com.uppidy.android.sdk.api.ApiContactInfo.java
com.uppidy.android.sdk.api.ApiContact.java
com.uppidy.android.sdk.api.ApiContainer.java
com.uppidy.android.sdk.api.ApiConversation.java
com.uppidy.android.sdk.api.ApiEntity.java
com.uppidy.android.sdk.api.ApiLocation.java
com.uppidy.android.sdk.api.ApiMessage.java
com.uppidy.android.sdk.api.ApiModifications.java
com.uppidy.android.sdk.api.ApiObject.java
com.uppidy.android.sdk.api.ApiProfile.java
com.uppidy.android.sdk.api.ApiSync.java
com.uppidy.android.sdk.api.BackupOperations.java
com.uppidy.android.sdk.api.FeedOperations.java
com.uppidy.android.sdk.api.UppidyApi.java
com.uppidy.android.sdk.api.Uppidy.java
com.uppidy.android.sdk.api.UserOperations.java
com.uppidy.android.sdk.api.impl.AbstractUppidyOperations.java
com.uppidy.android.sdk.api.impl.BackupTemplate.java
com.uppidy.android.sdk.api.impl.FeedTemplate.java
com.uppidy.android.sdk.api.impl.UppidyErrorHandler.java
com.uppidy.android.sdk.api.impl.UppidyTemplate.java
com.uppidy.android.sdk.api.impl.UserTemplate.java
com.uppidy.android.sdk.backup.BackupService.java
com.uppidy.android.sdk.backup.MessageProvider.java
com.uppidy.android.sdk.backup.NetworkStateListener.java
com.uppidy.android.sdk.connect.UppidyAdapter.java
com.uppidy.android.sdk.connect.UppidyConnectionFactory.java
com.uppidy.android.sdk.connect.UppidyOAuth2Template.java
com.uppidy.android.sdk.connect.UppidyServiceProvider.java
com.uppidy.android.util.StringUtil.java