接口 StompSession.Subscription
- 所有超级接口:
StompSession.Receiptable
- 封闭接口:
- StompSession
public static interface StompSession.Subscription extends StompSession.Receiptable
A handle to use to unsubscribe or to track a receipt.
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 StompHeaders
getSubscriptionHeaders()
Return the headers used on the SUBSCRIBE frame.String
getSubscriptionId()
Return the id for the subscription.void
unsubscribe()
Remove the subscription by sending an UNSUBSCRIBE frame.void
unsubscribe(StompHeaders headers)
Alternative tounsubscribe()
with additional custom headers to send to the server.从接口继承的方法 org.springframework.messaging.simp.stomp.StompSession.Receiptable
addReceiptLostTask, addReceiptTask, getReceiptId
方法详细资料
getSubscriptionId
@Nullable String getSubscriptionId()
Return the id for the subscription.
getSubscriptionHeaders
StompHeaders getSubscriptionHeaders()
Return the headers used on the SUBSCRIBE frame.- 从以下版本开始:
- 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.
- 参数:
headers
- the custom headers, if any- 从以下版本开始:
- 5.0