org.springframework.messaging.simp.broker

## Class DefaultSubscriptionRegistry

- java.lang.Object
- - org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry
  - - org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry

- All Implemented Interfaces:
    SubscriptionRegistry

      public class DefaultSubscriptionRegistry
      extends AbstractSubscriptionRegistry

  A default, simple in-memory implementation of `SubscriptionRegistry`.
  Since:
    4.0
  Author:
    Rossen Stoyanchev

- - ### Field Summary

    - ### Fields inherited from class org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry

      `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultSubscriptionRegistry()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addSubscriptionInternal(String sessionId, String subsId, String destination, Message<?> message)`
    `protected MultiValueMap<String,String>` | `findSubscriptionsInternal(String destination, Message<?> message)`
    `AntPathMatcher` | `getPathMatcher()`
    `protected void` | `removeSubscriptionInternal(String sessionId, String subscriptionId, Message<?> message)`
    `void` | `setPathMatcher(AntPathMatcher pathMatcher)`
    `String` | `toString()`
    `void` | `unregisterAllSubscriptions(String sessionId)` Remove all subscriptions associated with the given sessionId.

    - ### Methods inherited from class org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry

      `findSubscriptions, registerSubscription, unregisterSubscription`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultSubscriptionRegistry

          public DefaultSubscriptionRegistry()

  - ### Method Detail

    - #### setPathMatcher

          public void setPathMatcher(AntPathMatcher pathMatcher)

      Parameters:
        `pathMatcher` - the pathMatcher to set

    - #### getPathMatcher

          public AntPathMatcher getPathMatcher()

    - #### addSubscriptionInternal

          protected void addSubscriptionInternal(String sessionId,
                                                 String subsId,
                                                 String destination,
                                                 Message<?> message)

      Specified by:
        `addSubscriptionInternal` in class `AbstractSubscriptionRegistry`

    - #### removeSubscriptionInternal

          protected void removeSubscriptionInternal(String sessionId,
                                                    String subscriptionId,
                                                    Message<?> message)

      Specified by:
        `removeSubscriptionInternal` in class `AbstractSubscriptionRegistry`

    - #### unregisterAllSubscriptions

          public void unregisterAllSubscriptions(String sessionId)

      Description copied from interface: `SubscriptionRegistry`
      Remove all subscriptions associated with the given sessionId.
      Specified by:
        `unregisterAllSubscriptions` in interface `SubscriptionRegistry`
      Specified by:
        `unregisterAllSubscriptions` in class `AbstractSubscriptionRegistry`

    - #### findSubscriptionsInternal

          protected MultiValueMap<String,String> findSubscriptionsInternal(String destination,
                                                                           Message<?> message)

      Specified by:
        `findSubscriptionsInternal` in class `AbstractSubscriptionRegistry`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`