Last updated

API / geotoolkit / util / taskscheduler / ITask

Class: ITask

util.taskscheduler.ITask

Define an interface for Task

Interface

Table of contents

Constructors
Methods

Contents

Constructors

new ITask()

new ITask()

Methods

getCancel

Abstract getCancel(): Cancel

Return object to cancel task execution

Returns

Cancel


getId

Abstract getId(): number

Returns task id

Returns

number


run

Abstract run(success, fail): void

Run the task

Parameters

Name Type Description
success(task: ITask) => voida callback function to be call than task is competed
fail(task: ITask) => voida callback function to be call than task is fail

Returns

void


toPromise

Abstract toPromise(): Promise<any>

Creates promise for the current task

Returns

Promise<any>

a promise