Dispatcher mixin

Dispatcher mixin that manages event and response routing to registered listeners.

Implements a publish-subscribe pattern for AMI events and responses, allowing multiple listeners to subscribe to specific event types or action IDs.

Superclass constraints
Mixin applications

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

dispose() → void
Clean up resources. Called when component is no longer needed.
override
init() → void
Initialize resources. Called before using the component.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onReadEvent(Event event) → void
Called when an AMI event is received.
override
onReadGreeting(String words) → void
Called when the server greeting message is received.
inherited
onReadResponse(Response response) → void
Called when an AMI response is received.
override
readAllEventsUntil(String name, String eventPredicate) Future<List<Event>>
Collects all events of type name until eventPredicate event occurs.
readEvent(String name) Future<Event>
Waits for and returns the first occurrence of an event with name.
registerEvent(String name) Stream<Event>
Registers a listener for a specific event name.
registerResponse(String actionID) Stream<Response>
Registers a listener for responses with a specific actionID.
toString() String
A string representation of this object.
inherited

Operators

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