Package tbdex.sdk.protocol.models
Class MessageMetadata
-
- All Implemented Interfaces:
-
tbdex.sdk.protocol.models.Metadata
public final class MessageMetadata implements Metadata
A data class representing the metadata present on every Message
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringfromprivate final Stringtoprivate final MessageKindkindprivate final Stringidprivate final StringexchangeIdprivate final StringexternalIdprivate final OffsetDateTimecreatedAtprivate final Stringprotocol
-
Constructor Summary
Constructors Constructor Description MessageMetadata(String from, String to, MessageKind kind, String id, String exchangeId, String externalId, OffsetDateTime createdAt, String protocol)
-
Method Summary
Modifier and Type Method Description final StringgetFrom()The sender's DID final StringgetTo()the recipient's DID final MessageKindgetKind()e.g. final StringgetId()The message's ID final StringgetExchangeId()ID for an "exchange" of messages between Alice <-> PFI. final StringgetExternalId()Arbitrary ID for the caller to associate with the message. final OffsetDateTimegetCreatedAt()ISO 8601 timestamp final StringgetProtocol()Version of the protocol in use (x.x format). -
-
Constructor Detail
-
MessageMetadata
MessageMetadata(String from, String to, MessageKind kind, String id, String exchangeId, String externalId, OffsetDateTime createdAt, String protocol)
-
-
Method Detail
-
getKind
final MessageKind getKind()
e.g. rfq, quote etc. This defines the data property's type
-
getExchangeId
final String getExchangeId()
ID for an "exchange" of messages between Alice <-> PFI. Set by the first message in an exchange
-
getExternalId
final String getExternalId()
Arbitrary ID for the caller to associate with the message. Different messages in the same exchange can have different IDs
-
getCreatedAt
final OffsetDateTime getCreatedAt()
ISO 8601 timestamp
-
getProtocol
final String getProtocol()
Version of the protocol in use (x.x format). The protocol version must remain consistent across messages in a given exchange. Messages sharing the same exchangeId MUST also have the same protocol version. Protocol versions are tracked under https://github.com/TBD54566975/tbdex
-
-
-
-