EventDTO<T> class abstract

One event: its typed key (address plus local type), the data, the call arguments and an optional correlation id.

The address is user-supplied and stable; the type is local and never reaches the wire.

Implementers

Constructors

EventDTO.withKey(EventKey<T> key, T data, {Map<String, String>? arguments, String? correlationId})
Creates a DTO for a typed key.
factory

Properties

address → String
The stable address string.
no setter
arguments → Map<String, String>?
no setter
correlationId → String?
An optional id that ties an event and every event caused by it together.
no setter
data → T
no setter
hashCode → int
The hash code for this object.
no setterinherited
key → EventKey<T>
The typed key: address plus local type.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({T? data, EventKey<T>? key, Map<String, String>? arguments, String? correlationId}) → EventDTO<T>
A copy with some fields replaced. A null argument keeps the current value, so a correlation id cannot be cleared with this method.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Event representation for logs and serialization. Data is returned as is: encoding is up to the caller, so an arbitrary object in data no longer breaks the method.
toString() → String
A string representation of this object.
inherited

Operators

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