AsyncEventChannel class

An AsyncEventHub channel.

Mixed-in types

Constructors

AsyncEventChannel.new(AsyncEventHub hub, String name)

Properties

hashCode int
The hash code for this object.
no setterinherited
hasUnflushedEvents bool
Returns true if this instance has unflushed events.
no setter
hub AsyncEventHub
The event hub of this channel.
final
lastEventID AsyncEventID?
Returns the last AsyncEventID of this instance.
getter/setter pairinherited
name String
This channel name.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel(AsyncEventSubscription subscription) bool
Cancels a subscription.
cancelCalls() → void
Cancels current channel calls.
fetch(AsyncEventID fromID, {int? limit}) FutureOr<List<AsyncEvent>>
Fetches events of this channel starting fromID.
fetchDelayed(AsyncEventID fromID, {Duration timeout = const Duration(seconds: 1), int? limit}) FutureOr<List<AsyncEvent>>
Fetches events of this channel starting fromID with a timeout.
isAfterLastEventID(AsyncEventID? eventID) bool
Returns true if eventID is after lastEventID.
inherited
isNextEventID(AsyncEventID? eventID) bool
inherited
isSubscribed(AsyncEventSubscription subscription) bool
Returns true if subscription is subscribed to this channel.
isSubscribedGroup(AsyncEventSubscriptionGroup subscriptionGroup) bool
Returns true if subscriptionGroup is subscribed to this channel.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pull() FutureOr<int>
Checks for new events for this channel.
pulling({Duration? delay, Duration period = const Duration(seconds: 10), Duration? minInterval, bool started = true}) AsyncEventPulling
Returns a shared AsyncEventPulling based on the defined AsyncEventPullingConfig.
purge({AsyncEventID? untilID, DateTime? before, bool all = false}) FutureOr<int>
submit(String type, Map<String, dynamic> payload, {DateTime? time}) FutureOr<AsyncEvent?>
Submits and broadcast an event to this channel.
subscribe(AsyncEventListener listener, {AsyncEventID? fromID, bool fromBegin = false, bool fromEpochBegin = false}) FutureOr<AsyncEventSubscription>
Subscribe to events of this channel.
toString() String
A string representation of this object.
override
waitNewEvent(Duration timeout) Future<AsyncEvent?>
Waits for a new AsyncEvent with a timeout.

Operators

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