Class AbstractSubscriptionRegistry
java.lang.Object
org.springframework.messaging.simp.broker.AbstractSubscriptionRegistry
- All Implemented Interfaces:
- SubscriptionRegistry
- Direct Known Subclasses:
- DefaultSubscriptionRegistry
Abstract base class for implementations of 
SubscriptionRegistry that
 looks up information in messages but delegates to abstract methods for the
 actual storage and retrieval.- Since:
- 4.0
- Author:
- Rossen Stoyanchev
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract voidaddSubscriptionInternal(String sessionId, String subscriptionId, String destination, Message<?> message) final MultiValueMap<String,String> findSubscriptions(Message<?> message) Find all subscriptions that should receive the given message.protected abstract MultiValueMap<String,String> findSubscriptionsInternal(String destination, Message<?> message) final voidregisterSubscription(Message<?> message) Register a subscription represented by the given message.protected abstract voidremoveSubscriptionInternal(String sessionId, String subscriptionId, Message<?> message) final voidunregisterSubscription(Message<?> message) Unregister a subscription.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.messaging.simp.broker.SubscriptionRegistryunregisterAllSubscriptions
- 
Field Details- 
loggerprotected final org.apache.commons.logging.Log logger
 
- 
- 
Constructor Details- 
AbstractSubscriptionRegistrypublic AbstractSubscriptionRegistry()
 
- 
- 
Method Details- 
registerSubscriptionDescription copied from interface:SubscriptionRegistryRegister a subscription represented by the given message.- Specified by:
- registerSubscriptionin interface- SubscriptionRegistry
- Parameters:
- message- the subscription request
 
- 
unregisterSubscriptionDescription copied from interface:SubscriptionRegistryUnregister a subscription.- Specified by:
- unregisterSubscriptionin interface- SubscriptionRegistry
- Parameters:
- message- the request to unsubscribe
 
- 
findSubscriptionsDescription copied from interface:SubscriptionRegistryFind all subscriptions that should receive the given message. The map returned is safe to iterate and will never be modified.- Specified by:
- findSubscriptionsin interface- SubscriptionRegistry
- Parameters:
- message- the message
- Returns:
- a MultiValueMapwith sessionId-subscriptionId pairs (possibly empty)
 
- 
addSubscriptionInternal
- 
removeSubscriptionInternal
- 
findSubscriptionsInternalprotected abstract MultiValueMap<String,String> findSubscriptionsInternal(String destination, Message<?> message) 
 
-