BridgeMessage class
A single message on the bridge protocol.
Constructors
-
BridgeMessage({String? id, required BridgeMessageType type, Map<
String, dynamic> payload = const {}, DateTime? timestamp, String? correlationId}) - BridgeMessage.decode(String raw)
-
Deserialize from JSON string.
factory
-
BridgeMessage.fromJson(Map<
String, dynamic> json) -
Deserialize from JSON map.
factory
Properties
- correlationId → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
final
-
payload
→ Map<
String, dynamic> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestamp → DateTime
-
final
- type → BridgeMessageType
-
final
Methods
-
encode(
) → String - Serialize to JSON string for sending over the wire.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
respond(
BridgeMessageType responseType, [Map< String, dynamic> responsePayload = const {}]) → BridgeMessage - Create a response message correlated to this request.
-
toJson(
) → Map< String, dynamic> - Serialize to JSON map for wire transport.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited