Publication class
Represents a message publication to a Bayeux channel
Constructors
-
Publication.new({required String id, required Channel channel, required dynamic data, Map<
String, dynamic> ? ext}) -
Publication.fromBayeux(Map<
String, dynamic> message) -
Create a publication from a Bayeux message
factory
Properties
- channel → Channel
-
Channel being published to
final
- completedAt → DateTime?
-
Timestamp when publication was completed
no setter
- createdAt → DateTime
-
Timestamp when publication was created
final
- data → dynamic
-
Message data
final
- duration → int?
-
Duration of publication in milliseconds
no setter
- error → FayeError?
-
Error if publication failed
no setter
-
ext
→ Map<
String, dynamic> ? -
Extensions data (optional)
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Unique publication ID
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
statistics
→ Map<
String, dynamic> -
Get publication statistics
no setter
- subscriberCount → int
-
Number of subscribers that received the message
no setter
- successful → bool
-
Whether this publication was successful
no setter
Methods
-
markFailed(
FayeError error) → void - Mark publication as failed
-
markSuccessful(
[int subscriberCount = 0]) → void - Mark publication as successful
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBayeux(
) → Map< String, dynamic> - Convert to Bayeux message format
-
toJson(
) → String - Convert to JSON string
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override