ForwardMessage class
Represents a DIDComm Routing Protocol 2.0 Forward message as defined in DIDComm Messaging Spec, Routing Protocol 2.0.
The Forward message is used to instruct a mediator to forward an attached message to the next recipient in the routing chain.
- Inheritance
-
- Object
- DidcommMessage
- PlainTextMessage
- ForwardMessage
Constructors
-
ForwardMessage({required String id, required List<
String> ? to, required List<Attachment> ? attachments, required String next, String? from, DateTime? createdTime, DateTime? expiresTime, String? threadId, String? parentThreadId, List<String> ? acknowledged, List<String> ? pleaseAcknowledge}) - Constructs a ForwardMessage.
-
ForwardMessage.fromJson(Map<
String, dynamic> json) -
Creates a ForwardMessage from a JSON map.
factory
Properties
-
acknowledged
→ List<
String> ? -
List of message IDs that are being acknowledged by this message ("ack" field in DIDComm spec). Optional.
finalinherited
-
attachments
→ List<
Attachment> ? -
List of attachments. Optional.
finalinherited
-
body
→ Map<
String, dynamic> ? -
Message body, containing protocol-specific content.
finalinherited
- createdTime → DateTime?
-
Message creation time as a UTC timestamp ("created_time" field in DIDComm spec). Optional.
finalinherited
- expiresTime → DateTime?
-
Message expiration time as a UTC timestamp ("expires_time" field in DIDComm spec). Optional.
finalinherited
- from → String?
-
Sender's DID. Optional.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for the message ("id" field in DIDComm spec).
finalinherited
- next → String
-
The DID of the next recipient to which the attached message should be forwarded.
final
- parentThreadId → String?
-
Parent thread ID for nested threading ("pthid" field in DIDComm spec). Optional.
finalinherited
-
pleaseAcknowledge
→ List<
String> ? -
Massage IDs that need acknowledgment ("please_ack" field in DIDComm spec). Optional.
The ID of the current message is always implicitly requested to be acknowledged if this field is present.
The empty list means only the current message should be acknowledged.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- threadId → String?
-
Thread ID for message threading ("thid" field in DIDComm spec). Optional.
finalinherited
-
to
→ List<
String> ? -
List of recipient DIDs. Optional.
finalinherited
- type → Uri
-
Message type URI.
finalinherited
Methods
-
assignCustomHeaders(
Map< String, dynamic> json, List<String> ownHeaders) → void -
Assigns custom headers from
jsonthat are not inownHeaders.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes the message to a JSON map, including custom headers.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateConsistencyWithEncryptedMessage(
EncryptedMessage message, {required MessageWrappingType messageWrappingType}) → void -
Validates addressing consistency between this PlainTextMessage and an EncryptedMessage.
inherited
-
validateConsistencyWithSignedMessage(
SignedMessage message, {required MessageWrappingType messageWrappingType}) → void -
Validates addressing consistency between this PlainTextMessage and a SignedMessage.
inherited
-
withCustomHeaders(
Map< String, dynamic> json) → Map<String, dynamic> -
Merges
jsonwith custom headers for serialization.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String key) → dynamic -
Gets a custom header value by
key.inherited -
operator []=(
String key, dynamic value) → void -
Sets a custom header
valuefor the givenkey.inherited
Static Properties
- messageType → Uri
-
The URI representing the message type.
This is used to identify the specific protocol message type within DIDComm.
final