LoadingProcess

LoadingProcess

new LoadingProcess()

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

The process wrapper class.

This module is used to update a process in the process monitor.

Classes

LoadingProcess

Members

data

Source:

Return the process extra data.

id

Source:

Return the process internal id

name

Source:

Return the process name

Methods

finish()

Source:

Mark the process as finished.

getData() → {Object}

Source:

Returns the current rpocess data.

Returns:

the process data

Type
Object

onError(callback)

Source:

Define a error process callback function.

Parameters:
Name Type Description
callback function

the callback function

onFinish(callback)

Source:

Define a finished process callback function.

Parameters:
Name Type Description
callback function

the callback function

onRemove(callback)

Source:

Define a removed from monitor process callback function.

Parameters:
Name Type Description
callback function

the callback function

remove()

Source:

Remove the process from the monitor.

setError(error)

Source:

Set the process error string.

Note: set the error message will mark the process as finished.

Parameters:
Name Type Description
error String

the string message

setExtraData(extraData)

Source:

Stores extra information to the process.

This method is used to add information like the course, the user or any other needed information.

Parameters:
Name Type Description
extraData Object

any extra process information to store

setName(name)

Source:

Rename the process

Parameters:
Name Type Description
name String

the new process name

setPercentage(percentage)

Source:

Set the process percentage.

Parameters:
Name Type Description
percentage Number