Skip to main content

//clika-runtime/io.clika.modelverse/DownloadListener

DownloadListener

[common]
fun interface DownloadListener

Hears a download's progress (Modelverse.snapshot): one call per transfer step of each file the resolve fetches, on the calling thread, with the file's bytes and the plan's. Return false to stop the download: the call then refuses with the hub's own cancel status; an exception the listener lets escape stops it the same way. A snapshot served from the cache reports nothing, since a cached file never joins the plan.

Functions​

NameSummary
onProgress[common]
abstract fun onProgress(event: DownloadEvent): Boolean