API Documentation for: 1.0.0
Show:

FunctionTask Class

Extends Task
Defined in: FunctionTask:9
Namespace: cloudkid

A task to do some generic async function task

Constructor

FunctionTask

(
  • id
  • serviceCall
  • callback
  • args
)

Defined in FunctionTask:9

Parameters:

  • id String

    Alias for this task

  • serviceCall Function

    Function the service call

  • callback Function

    Function to call when the task is completed

  • args

    The arguments passed to the service call

Methods

cancel

() Bool

Inherited from Task: cancel:83

Cancel the task - for use in inherited classes

Returns:

Bool:

If the cancel was successful

destroy

()

Inherited from Task but overwritten in destroy:93

Destroy this load task and don't use after this

done

(
  • result
  • manager
)

Inherited from Task: done:58

Called from the task manager when a Task is finished

Parameters:

  • result Type

    The resulting data from the return

  • manager TaskManager

    The reference to the manager

initialize

(
  • id
  • serviceCall
  • callback
  • args
)

Inherited from Task but overwritten in initialize:47

Create the service task

Parameters:

  • id String

    The key for the task

  • serviceCall Function

    Function the service call

  • callback Function

    The function to callback when done

  • args

    The arguments passed to the service call, (callback is first)

start

(
  • callback
)

Inherited from Task but overwritten in start:72

Start the load

Parameters:

  • callback Function

    Callback to call when the load is done

toString

() String

Inherited from Task but overwritten in toString:82

Get a string representation of this task

Returns:

String:

A string representation of this task

Properties

_isDestroyed

Bool protected

Inherited from Task: _isDestroyed:37

Bool to keep track if this has been destroyed

args

Defined in args:41

The media loader priorty of the load

callback

Function

Inherited from Task: callback:30

Callback to call when the task is completed

id

String

Inherited from Task: id:23

The unique id of the task

serviceCall

Function

Defined in serviceCall:34

The url of the file to load