MissionDispatcher class
Serialises and arbitrates mission execution.
Constructors
-
MissionDispatcher({required Future<
void> runMission(MissionMessage mission, MissionCancelToken token), int maxPendingCancels = 32})
Properties
- activeMissionId → String?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBusy → bool
-
no setter
- maxPendingCancels → int
-
Bound on the remembered cancel-before-run ids. 32 is far above any real
backlog; the bound exists so a misbehaving backend cannot grow SDK memory
without limit.
final
-
runMission
→ Future<
void> Function(MissionMessage mission, MissionCancelToken token) -
Executes one mission to completion.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
String missionId) → void - Cancel by id — the running mission, or a not-yet-arrived one (cancel-before-run).
-
cancelAll(
) → void - Teardown: withdraw whatever is running and forget remembered cancels.
-
hasLiveMission(
bool test(String missionId)) → bool -
True when any submitted-and-unfinished mission (queued or running)
satisfies
test— e.g. "a real (non-hl_) mission owns the UI". -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
submit(
MissionMessage mission) → Future< void> - Submit a mission.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited