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
listener
will be notified. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postMessage(
String channelName, SerializableEntity message, {bool global = false}) → void -
Posts a
message
to a named channel. Ifglobal
is 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. -
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