Download Work Manager
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?
Content copied to clipboard
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>>
Content copied to clipboard
Processes the download response and returns the resources to be saved to the local database.