org.springframework.messaging.simp.stomp

## Interface StompSession.Receiptable

- All Known Subinterfaces:
    StompSession.Subscription
  Enclosing interface:
    StompSession

      public static interface StompSession.Receiptable

  A handle to use to track receipts.
  See Also:
    `StompSession.setAutoReceipt(boolean)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addReceiptLostTask(Runnable task)` Task to invoke when a receipt is not received in the configured time.
    `void` | `addReceiptTask(Consumer<StompHeaders> task)` Variant of `addReceiptTask(Runnable)` with a `Consumer` of the headers from the `RECEIPT` frame.
    `void` | `addReceiptTask(Runnable task)` Task to invoke when a receipt is received.
    `String` | `getReceiptId()` Return the receipt id, or `null` if the STOMP frame for which the handle was returned did not have a "receipt" header.

- - ### Method Detail

    - #### getReceiptId

          @Nullable
          String getReceiptId()

      Return the receipt id, or `null` if the STOMP frame for which the handle was returned did not have a "receipt" header.

    - #### addReceiptTask

          void addReceiptTask(Runnable task)

      Task to invoke when a receipt is received.
      Parameters:
        `task` - the task to invoke
      Throws:
        `IllegalArgumentException` - if the receiptId is `null`

    - #### addReceiptTask

          void addReceiptTask(Consumer<StompHeaders> task)

      Variant of `addReceiptTask(Runnable)` with a `Consumer` of the headers from the `RECEIPT` frame.
      Parameters:
        `task` - the consumer to invoke
      Throws:
        `IllegalArgumentException` - if the receiptId is `null`
      Since:
        5.3.23

    - #### addReceiptLostTask

          void addReceiptLostTask(Runnable task)

      Task to invoke when a receipt is not received in the configured time.
      Parameters:
        `task` - the task to invoke
      Throws:
        `IllegalArgumentException` - if the receiptId is `null`
      See Also:
        `StompClientSupport.setReceiptTimeLimit(long)`