{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Class: ITask","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/readme"},"children":["API"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit"},"children":["geotoolkit"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.util"},"children":["util"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.util.taskscheduler"},"children":["taskscheduler"]}," / ITask"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"class-itask","__idx":0},"children":["Class: ITask"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.util"},"children":["util"]},".",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.util.taskscheduler"},"children":["taskscheduler"]},".ITask"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Define an interface for Task"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Interface"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"table-of-contents","__idx":1},"children":["Table of contents"]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Constructors"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.util.taskscheduler.itask#new-itask"},"children":["new ITask()"]}]}]}]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Methods"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.util.taskscheduler.itask#getcancel"},"children":["getCancel"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.util.taskscheduler.itask#getid"},"children":["getId"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.util.taskscheduler.itask#run"},"children":["run"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.util.taskscheduler.itask#topromise"},"children":["toPromise"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"contents","__idx":2},"children":["Contents"]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Constructors"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"new-itask","__idx":3},"children":["new ITask()"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["new ITask"]},"()"]}]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Methods"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"getcancel","__idx":4},"children":["getCancel"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Abstract"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getCancel"]},"(): ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.util.cancel.cancel"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Cancel"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Return object to cancel task execution"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns","__idx":5},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.util.cancel.cancel"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Cancel"]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"getid","__idx":6},"children":["getId"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Abstract"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getId"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns task id"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-1","__idx":7},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"run","__idx":8},"children":["run"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Abstract"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["run"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fail"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run the task"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters","__idx":9},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task"]},": ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.util.taskscheduler.itask"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ITask"]}]},") => ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["a callback function to be call than task is competed"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fail"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task"]},": ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.util.taskscheduler.itask"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ITask"]}]},") => ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["a callback function to be call than task is fail"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-2","__idx":10},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"topromise","__idx":11},"children":["toPromise"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Abstract"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["toPromise"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["any"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Creates promise for the current task"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-3","__idx":12},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["any"]},">"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["a promise"]}]}]},"headings":[{"value":"Class: ITask","id":"class-itask","depth":1},{"value":"Table of contents","id":"table-of-contents","depth":2},{"value":"Contents","id":"contents","depth":2},{"value":"new ITask()","id":"new-itask","depth":4},{"value":"getCancel","id":"getcancel","depth":4},{"value":"Returns","id":"returns","depth":4},{"value":"getId","id":"getid","depth":4},{"value":"Returns","id":"returns-1","depth":4},{"value":"run","id":"run","depth":4},{"value":"Parameters","id":"parameters","depth":4},{"value":"Returns","id":"returns-2","depth":4},{"value":"toPromise","id":"topromise","depth":4},{"value":"Returns","id":"returns-3","depth":4}],"frontmatter":{"seo":{"title":"Class: ITask"}},"lastModified":"2026-02-11T19:54:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/geotoolkit/apis/classes/geotoolkit.util.taskscheduler.itask","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}