Session class

A domain view of a brokered session: who opened it, on which node, in what mode, and its current state and exit code.

Annotations
  • @immutable

Constructors

Session({required SessionId id, required NodeId nodeId, required PrincipalId principal, required SessionMode mode, required SessionState state, required DateTime openedAt, int? exitCode})
Creates a session view.
const

Properties

exitCode → int?
The process exit code, once the session has finished (else null).
final
hashCode → int
The hash code for this object.
no setterinherited
id → SessionId
The session's unique id.
final
mode → SessionMode
Whether the session is an exec or an interactive shell.
final
nodeId → NodeId
The node the session runs on.
final
openedAt → DateTime
When the session was opened.
final
principal → PrincipalId
The principal that opened the session.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → SessionState
The session's current lifecycle state.
final

Methods

copyWith({SessionState? state, int? exitCode}) → Session
Returns a copy with selected fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited