ExitCodeEvent class
An ApplicationEvent that signals the application should exit with a specific exit code.
This event can be published at any point in the application lifecycle to trigger a graceful shutdown with the given code. It's commonly used in CLI tools or frameworks where exit codes carry semantic meaning, such as success, configuration error, missing file, or runtime failure.
Example:
context.publishEvent(ExitCodeEvent(this, 1));
- Inheritance
-
- Object
- EventObject
- ApplicationEvent
- ExitCodeEvent
Constructors
- ExitCodeEvent(Object source, int _exitCode)
-
Creates a new ExitCodeEvent with the given
source
and_exitCode
.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
equalizedProperties(
) → List< Object?> -
Mixin-style contract for value-based equality,
hashCode
, andtoString
.override -
getExitCode(
) → int - Returns the exit code associated with this event.
-
getPackageName(
) → String - Represents an abstraction for identifying the package that an object, resource, or service belongs to.
-
getSource(
) → Object -
Returns the source of the event.
inherited
-
getTimestamp(
) → DateTime -
Returns the timestamp of the event.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toStringOptions(
) → ToStringOptions -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited