API / geotoolkit / util / taskscheduler / ITask
util.taskscheduler.ITask
Define an interface for Task
Interface
Constructors
Methods
▸ Abstract getCancel(): Cancel
Return object to cancel task execution
▸ Abstract getId(): number
Returns task id
number
▸ Abstract run(success, fail): void
Run the task
| Name | Type | Description |
|---|---|---|
success | (task: ITask) => void | a callback function to be call than task is competed |
fail | (task: ITask) => void | a callback function to be call than task is fail |
void
▸ Abstract toPromise(): Promise<any>
Creates promise for the current task
Promise<any>
a promise