Class Close

  • All Implemented Interfaces:
    tbdex.sdk.http.ReplyToMessage , tbdex.sdk.messages.Message

    
    public final class Close
     implements Message, ReplyToMessage
                        

    Represents a Close message in the tbDEX protocol.

    A Close message is sent by a PFI to Alice to signal the termination of an exchange, either because the exchange was successfully completed or because it cannot be fulfilled.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class Close.Companion
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final MessageMetadata getMetadata() Metadata about the message, including sender, recipient, and protocol information.
      final CloseData getData() The data part of the Close message, including the reason for closure and success status.
      final String getSignature() The signature verifying the authenticity and integrity of the Close message.
      final String toJsonString() Serializes the Close message to a JSON string.
      final Unit sign(BearerDid bearerDid) Signs the Close message using the provided Bearer DID.
      final Unit verify() Verifies the Close message's signature and validity.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getMetadata

         final MessageMetadata getMetadata()

        Metadata about the message, including sender, recipient, and protocol information.

      • getData

         final CloseData getData()

        The data part of the Close message, including the reason for closure and success status.

      • getSignature

         final String getSignature()

        The signature verifying the authenticity and integrity of the Close message.

      • toJsonString

         final String toJsonString()

        Serializes the Close message to a JSON string.

        Returns:

        The serialized JSON string of the Close message.

      • sign

         final Unit sign(BearerDid bearerDid)

        Signs the Close message using the provided Bearer DID.

        Parameters:
        bearerDid - The Bearer DID used to sign the Close message.
      • verify

         final Unit verify()

        Verifies the Close message's signature and validity.