DownloadWorkManager

interface DownloadWorkManager

Manager that generates the FHIR requests and handles the FHIR responses of a download job.

TODO(jingtang10): What happens after the end of a download job. Should a new download work manager be created or should there be an API to restart a new download job.

Functions

Link copied to clipboard
abstract suspend fun getNextRequestUrl(context: SyncDownloadContext): String?

Returns the URL for the next download request, or null if there is no more download request to be issued.

Link copied to clipboard
abstract suspend fun processResponse(response: <ERROR CLASS>): Collection<<ERROR CLASS>>

Processes the download response and returns the resources to be saved to the local database.

Inheritors

Link copied to clipboard