Manager mixin

AMI Manager mixin that handles connection lifecycle and greeting messages.

Manages the initial connection handshake and extracts server version info.

Superclass constraints
Mixin applications

Properties

hashCode int
The hash code for this object.
no setterinherited
prefix String?
Prefix for generating unique action IDs.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusStream Stream<bool>?
Stream of connection status changes (true = connected, false = disconnected).
no setterinherited
title Future<String>
Future that completes with the server title from the greeting message.
no setter
version Future<String>
Future that completes with the server version from the greeting message.
no setter

Methods

available() bool
Returns true if connected and ready to send data.
inherited
connect(String host, int port, {dynamic args}) Future<void>
Establishes a connection to the AMI server.
inherited
disconnect() → void
Closes the connection to the AMI server.
inherited
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.
inherited
onReadGreeting(String words) → void
Called when the server greeting message is received.
override
onReadResponse(Response response) → void
Called when an AMI response is received.
inherited
readAllEventsUntil(String name, String eventPredicate) Future<List<Event>>
Collects all events of type name until eventPredicate event occurs.
inherited
readEvent(String name) Future<Event>
Waits for and returns the first occurrence of an event with name.
inherited
registerEvent(String name) Stream<Event>
Registers a listener for a specific event name.
inherited
registerResponse(String actionID) Stream<Response>
Registers a listener for responses with a specific actionID.
inherited
send(Map<String, String> data) → void
Sends data to the AMI server.
inherited
sendAction(String name, {String? id, Map<String, String>? args, Duration? timeout}) Future<Response?>
Sends an AMI action and returns the response.
inherited
toString() String
A string representation of this object.
inherited

Operators

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