org.springframework.messaging.simp.stomp

## 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
`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 to `unsubscribe()` 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 to `unsubscribe()` 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