LoadingProcess

LoadingProcess

new LoadingProcess()

Description:
  • The process wrapper class.

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

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

Classes

LoadingProcess

Members

data

Description:
  • Return the process extra data.

Source:

Return the process extra data.

id

Description:
  • Return the process internal id

Source:

Return the process internal id

name

Description:
  • Return the process name

Source:

Return the process name

Methods

finish()

Description:
  • Mark the process as finished.

Source:

getData() → {Object}

Description:
  • Returns the current rpocess data.

Source:
Returns:

the process data

Type
Object

onError(callback)

Description:
  • Define a error process callback function.

Source:
Parameters:
Name Type Description
callback function

the callback function

onFinish(callback)

Description:
  • Define a finished process callback function.

Source:
Parameters:
Name Type Description
callback function

the callback function

onRemove(callback)

Description:
  • Define a removed from monitor process callback function.

Source:
Parameters:
Name Type Description
callback function

the callback function

remove()

Description:
  • Remove the process from the monitor.

Source:

setError(error)

Description:
  • Set the process error string.

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

Source:
Parameters:
Name Type Description
error String

the string message

setExtraData(extraData)

Description:
  • Stores extra information to the process.

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

Source:
Parameters:
Name Type Description
extraData Object

any extra process information to store

setName(name)

Description:
  • Rename the process

Source:
Parameters:
Name Type Description
name String

the new process name

setPercentage(percentage)

Description:
  • Set the process percentage.

Source:
Parameters:
Name Type Description
percentage Number