private class DefaultStompSession.DefaultSubscription extends DefaultStompSession.ReceiptHandler implements StompSession.Subscription
Modifier and Type | Field and Description |
---|---|
private StompFrameHandler |
handler |
private StompHeaders |
headers |
Constructor and Description |
---|
DefaultSubscription(StompHeaders headers,
StompFrameHandler handler) |
Modifier and Type | Method and Description |
---|---|
StompFrameHandler |
getHandler() |
StompHeaders |
getSubscriptionHeaders()
Return the headers used on the SUBSCRIBE frame.
|
java.lang.String |
getSubscriptionId()
Return the id for the subscription.
|
java.lang.String |
toString() |
void |
unsubscribe()
Remove the subscription by sending an UNSUBSCRIBE frame.
|
void |
unsubscribe(StompHeaders headers)
Alternative to
StompSession.Subscription.unsubscribe() with additional custom headers
to send to the server. |
addReceiptLostTask, addReceiptTask, getReceiptId, handleReceiptNotReceived, handleReceiptReceived
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addReceiptLostTask, addReceiptTask, getReceiptId
private final StompHeaders headers
private final StompFrameHandler handler
public DefaultSubscription(StompHeaders headers, StompFrameHandler handler)
@Nullable public java.lang.String getSubscriptionId()
StompSession.Subscription
getSubscriptionId
in interface StompSession.Subscription
public StompHeaders getSubscriptionHeaders()
StompSession.Subscription
getSubscriptionHeaders
in interface StompSession.Subscription
public StompFrameHandler getHandler()
public void unsubscribe()
StompSession.Subscription
unsubscribe
in interface StompSession.Subscription
public void unsubscribe(@Nullable StompHeaders headers)
StompSession.Subscription
StompSession.Subscription.unsubscribe()
with additional custom headers
to send to the server.
Note: There is no need to set the subscription id.
unsubscribe
in interface StompSession.Subscription
headers
- the custom headers, if anypublic java.lang.String toString()
toString
in class java.lang.Object