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, {bool global = false}) → Future< bool> -
Posts a
messageto a named channel. Ifglobalis set to true, the message will be posted to all servers in the cluster, otherwise it will only be posted locally on the current server. Returns true if the message was successfully posted. -
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