Libraries.System.ProcessEvent Documentation
This class represents an event that happened while using a process. There are four kinds, a process starting, stopping, output through standard out, or output through standard error. The event code needs to be checked in order to use the event.
Inherits from: Libraries.Language.Object
Summary
Variable Summary Table
Variables | Description |
---|---|
integer OUTPUT_EVENT | This constant indicates the process has output from standard out. |
integer STOP_EVENT | This constant indicates the process has stopped. |
integer ERROR_EVENT | This constant indicates the process has output from standard error. |
integer START_EVENT | This constant indicates the process has started. |
Actions Summary Table
Actions | Description |
---|---|
Compare(Libraries.Language.Object object) | This action compares two object hash codes and returns an integer. |
Equals(Libraries.Language.Object object) | This action determines if two objects are equal based on their hash code values. |
GetEventCode() | This returns which event code is on this event. |
GetExit() | Returns the exit code from the process. |
GetHashCode() | This action gets the hash code for an object. |
GetName() | Returns the name of the process |
GetOutput() | Returns output from the process. |
GetParameters() | Returns the parameters of the process |
GetProcess() | Returns the process on which the event was fired. |
SetEventCode(integer code) | This sets the event code is on this event. |
SetExit(integer exit) | Returns the exit code from the process. |
SetName(text name) | Sets the name of the process |
SetOutput(text out) | Sets output from the process. |
SetParameters(Libraries.Containers.Array<text> flags) | Sets the parameters of the process |
SetProcess(Libraries.System.Process process) | Sets the process on which the event was fired. |
Actions Documentation
Compare(Libraries.Language.Object object)
This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.
Example Code
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Example Code
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
GetEventCode()
This returns which event code is on this event.
Return
integer: the event code for the event.
GetExit()
Returns the exit code from the process. An exit code of 0 means that the process ended normally. Anything except for zero means that the process ended in an error. Non-zero codes, to our knowledge, do not have a standardized meaning, so they should not be relied upon.
Return
integer: the exit code.
GetHashCode()
This action gets the hash code for an object.
Example Code
Object o
integer hash = o:GetHashCode()
Return
integer: The integer hash code of the object.
GetName()
Returns the name of the process
Return
text: the name.
GetOutput()
Returns output from the process. Whether this was on standard error or standard out, the call is the same. The only different is that the event code will indicate where the output came from.
Return
text: the output.
GetParameters()
Returns the parameters of the process
Return
Libraries.Containers.Array: the parameters.
GetProcess()
Returns the process on which the event was fired.
Return
Libraries.System.Process: the process.
SetEventCode(integer code)
This sets the event code is on this event.
Parameters
- integer code: the event code for the event.
SetExit(integer exit)
Returns the exit code from the process. An exit code of 0 means that the process ended normally. Anything except for zero means that the process ended in an error. Non-zero codes, to our knowledge, do not have a standardized meaning, so they should not be relied upon.
Parameters
- integer exit: the exit code.
SetName(text name)
Sets the name of the process
Parameters
- text name: the name of the process.
SetOutput(text out)
Sets output from the process. Generally, we need to set where the output is coming from and this is automatic by the system.
Parameters
- text out: the output.
SetParameters(Libraries.Containers.Array<text> flags)
Sets the parameters of the process
Parameters
- Libraries.Containers.Array: the parameters of the process.
SetProcess(Libraries.System.Process process)
Sets the process on which the event was fired.
Parameters
- Libraries.System.Process: the process.