MessageCentralAccess class
Provides access to the Serverpod's MessageCentral.
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
-
addListener(
String channelName, MessageCentralListenerCallback listener) → void -
Adds a listener to a named channel. Whenever a message is posted using
postMessage, the
listenerwill be notified. -
authenticationRevoked(
String userIdentifier, SerializableModel message) → Future< bool> - Broadcasts revoked authentication events to the Serverpod framework. This message ensures authenticated connections to the user are closed.
-
createStream<
T> (String channelName) → Stream< T> - Creates a stream that listens to a specified channel.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postMessage(
String channelName, SerializableModel message, {MessageScope scope = MessageScope.auto}) → Future< bool> -
Posts a
messageto a named channel. Thescopedetermines whether the message is delivered locally on the current server, globally to all servers in the cluster, or globally with a local fallback if Redis is not enabled (the default). -
removeListener(
String channelName, MessageCentralListenerCallback listener) → void - Removes a listener from a named channel.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited