Subscription

A handle to use to unsubscribe or to track a receipt.

Members

Functions

getSubscriptionHeaders
StompHeaders getSubscriptionHeaders()

Return the headers used on the SUBSCRIBE frame. @since 5.0

getSubscriptionId
string getSubscriptionId()

Return the id for the subscription.

unsubscribe
void unsubscribe()

Remove the subscription by sending an UNSUBSCRIBE frame.

unsubscribe
void unsubscribe(StompHeaders headers)

Alternative to {@link #unsubscribe()} with additional custom headers to send to the server. <p><strong>Note:</strong> There is no need to set the subscription id. @param headers the custom headers, if any @since 5.0

Inherited Members

From Receiptable

getReceiptId
string getReceiptId()

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

addReceiptTask
void addReceiptTask(Runnable runnable)

Task to invoke when a receipt is received. @throws java.lang.IllegalArgumentException if the receiptId is {@code null}

addReceiptLostTask
void addReceiptLostTask(Runnable runnable)

Task to invoke when a receipt is not received in the configured time. @throws java.lang.IllegalArgumentException if the receiptId is {@code null} @see hunt.stomp.simp.stomp.StompClientSupport#setReceiptTimeLimit(long)

Meta