public abstract class

OfflineODataDelegate

extends Object
java.lang.Object
   ↳ com.sap.cloud.mobile.odata.offline.OfflineODataDelegate

Class Overview

A delegate used to get progress updates while an OfflineODataProvider is opening, downloading, file downloading, uploading, and sending the store to server; to get state change notifications; and to get information about requests that fail during an upload.

The delegate provides observation of running OfflineODataProvider, don't put heavy lift process in the call back method or block the call back method.

To override the method of OfflineODataDelegate to get information from update.

Summary

Public Constructors
OfflineODataDelegate()
Public Methods
void updateDownloadProgress(OfflineODataProvider provider, OfflineODataProgress progress)
Called every time there is an update while the provider is performing a download.
void updateFailedRequest(OfflineODataProvider provider, OfflineODataFailedRequest request)
Called every time for a request that fails on OData backend during an upload.
void updateFileDownloadProgress(OfflineODataProvider provider, OfflineODataFileDownloadProgress progress)
Called every time there is an update while downloading an offline store via a file download.
void updateSendStoreProgress(OfflineODataProvider provider, OfflineODataSendStoreProgress progress)
Called every time there is an update while the provider is sending the offline store to server.
void updateStoreState(OfflineODataProvider provider, OfflineODataStoreState state)
Called whenever the store state changes.
void updateUploadProgress(OfflineODataProvider provider, OfflineODataProgress progress)
Called every time there is an update while the provider is uploading.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public OfflineODataDelegate ()

Public Methods

public void updateDownloadProgress (OfflineODataProvider provider, OfflineODataProgress progress)

Called every time there is an update while the provider is performing a download. Generally the Offline OData framework and mobile service communicate through a sequence of proprietary commands while performing a download. This is the typical communication when performing a download to retrieve the delta from the backend. This function updates the progress of that communication. During the download processing, mobile services MAY decide to send a new offline store in its entirety via a file download. See updateFileDownloadProgress(OfflineODataProvider, OfflineODataFileDownloadProgress) for the progress on the file transfer.

Parameters
provider the OfflineODataProvider which download progress has been updated.
progress the progress to be updated.

public void updateFailedRequest (OfflineODataProvider provider, OfflineODataFailedRequest request)

Called every time for a request that fails on OData backend during an upload.

Note that the upload operation will report a successful result even if some requests have failed against the OData backend.

Parameters
provider the OfflineODataProvider which uploading changes.
request the information of the failed request.

public void updateFileDownloadProgress (OfflineODataProvider provider, OfflineODataFileDownloadProgress progress)

Called every time there is an update while downloading an offline store via a file download. A new offline store is always received via a file download the first time the provider is opened. On subsequent downloads a new offline store will be sent via a file download if a change to the metadata is detected or if a delta link expired.

Parameters
provider the OfflineODataProvider which downloading a file.
progress the progress to be updated.

public void updateSendStoreProgress (OfflineODataProvider provider, OfflineODataSendStoreProgress progress)

Called every time there is an update while the provider is sending the offline store to server.

Parameters
provider the OfflineODataProvider which sends the offline store.
progress the progress to be updated.

public void updateStoreState (OfflineODataProvider provider, OfflineODataStoreState state)

Called whenever the store state changes.

Parameters
provider the OfflineODataProvider which has a change of state.
state the new state.

public void updateUploadProgress (OfflineODataProvider provider, OfflineODataProgress progress)

Called every time there is an update while the provider is uploading.

Parameters
provider the OfflineODataProvider which uploading changes.
progress the progress to be updated.