Interface StompSession.Subscription
- All Superinterfaces:
StompSession.Receiptable
- Enclosing interface:
- StompSession
public static interface StompSession.Subscription extends StompSession.Receiptable
A handle to use to unsubscribe or to track a receipt.
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StompHeadersgetSubscriptionHeaders()Return the headers used on the SUBSCRIBE frame.StringgetSubscriptionId()Return the id for the subscription.voidunsubscribe()Remove the subscription by sending an UNSUBSCRIBE frame.voidunsubscribe(StompHeaders headers)Alternative tounsubscribe()with additional custom headers to send to the server.Methods inherited from interface org.springframework.messaging.simp.stomp.StompSession.Receiptable
addReceiptLostTask, addReceiptTask, getReceiptId
Method Detail
getSubscriptionId
@Nullable String getSubscriptionId()
Return the id for the subscription.
getSubscriptionHeaders
StompHeaders getSubscriptionHeaders()
Return the headers used on the SUBSCRIBE frame.- Since:
- 5.0
unsubscribe
void unsubscribe()
Remove the subscription by sending an UNSUBSCRIBE frame.
unsubscribe
void unsubscribe(@Nullable StompHeaders headers)
Alternative tounsubscribe()with additional custom headers to send to the server.Note: There is no need to set the subscription id.
- Parameters:
headers- the custom headers, if any- Since:
- 5.0