Package | weavejs.api.core |
Interface | public interface IProgressIndicator extends ILinkableObject |
Implementors | ProgressIndicator |
Method | Defined By | ||
---|---|---|---|
addTask(taskToken:Object, busyObject:ILinkableObject = null, description:String = null):void
This function will register a background task. | IProgressIndicator | ||
getNormalizedProgress():Number
This function checks the overall progress of all pending requests. | IProgressIndicator | ||
getTaskCount():int
This is the number of active background tasks. | IProgressIndicator | ||
hasTask(taskToken:Object):Boolean
This function will check if a background task is registered as an active task. | IProgressIndicator | ||
removeTask(taskToken:Object):void
This function will remove a previously registered pending request token and decrease the pendingRequestCount if necessary. | IProgressIndicator | ||
updateTask(taskToken:Object, progress:Number):void
This function will report the progress of a background task. | IProgressIndicator |
addTask | () | method |
public function addTask(taskToken:Object, busyObject:ILinkableObject = null, description:String = null):void
This function will register a background task.
Parameters
taskToken:Object — A token representing a background task. If this is an AsyncToken, a responder will be added that will automatically call removeTask(taskToken) on success or failure.
| |
busyObject:ILinkableObject (default = null ) — An object that is responsible for the task. If specified, will call WeaveAPI.SessionManager.assignBusyTask().
| |
description:String (default = null ) — A description of the task.
|
See also
getNormalizedProgress | () | method |
public function getNormalizedProgress():Number
This function checks the overall progress of all pending requests.
ReturnsNumber — A Number between 0 and 1.
|
getTaskCount | () | method |
public function getTaskCount():int
This is the number of active background tasks.
Returnsint |
hasTask | () | method |
public function hasTask(taskToken:Object):Boolean
This function will check if a background task is registered as an active task.
Parameters
taskToken:Object — A token representing a background task.
|
Boolean — A value of true if the task was previously added and not yet removed.
|
removeTask | () | method |
public function removeTask(taskToken:Object):void
This function will remove a previously registered pending request token and decrease the pendingRequestCount if necessary. Also calls WeaveAPI.SessionManager.unassignBusyTask().
Parameters
taskToken:Object — The object to remove from the progress indicator.
|
See also
updateTask | () | method |
public function updateTask(taskToken:Object, progress:Number):void
This function will report the progress of a background task.
Parameters
taskToken:Object — An object representing a task.
| |
progress:Number — A number between 0 and 1 indicating the current progress of the task.
|