Kanzi  3.9.9
Kanzi Engine Java API
ResourceManager.AcquireTask Class Reference

Load task for a group of resources. More...

Inheritance diagram for ResourceManager.AcquireTask:
[legend]

Classes

interface  Callback
 Callback interface to indicate that resource loading is finished. More...
 

Public Member Functions

ObjectRef< ResourcegetLoadedResource (String url)
 Gets a resource that has been loaded by this task. More...
 
boolean isFinished ()
 Tells whether the task has been finished and the callback called. More...
 

Detailed Description

Load task for a group of resources.

The task is created from a set of URLs and a callback. When Kanzi loads all URLs, it calls the callback. See ResourceManager#acquireResourcesAsync and ResourceManager#wait(AcquireTask).

Member Function Documentation

ObjectRef<Resource> getLoadedResource ( String  url)

Gets a resource that has been loaded by this task.

If the loading is not yet finished, or if the given URL has failed to load, returns a null.

Parameters
urlThe URL of a resource in this load task.
Returns
The loaded resource, or null if the resource has not been successfully loaded.
boolean isFinished ( )

Tells whether the task has been finished and the callback called.

Returns
True if the task has finished.