Interface SubscriptionRegistry
- All Known Implementing Classes:
AbstractSubscriptionRegistry,DefaultSubscriptionRegistry
public interface SubscriptionRegistry
A registry of subscription by session that allows looking up subscriptions.
- Since:
- 4.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionfindSubscriptions(Message<?> message) Find all subscriptions that should receive the given message.voidregisterSubscription(Message<?> subscribeMessage) Register a subscription represented by the given message.voidunregisterAllSubscriptions(String sessionId) Remove all subscriptions associated with the given sessionId.voidunregisterSubscription(Message<?> unsubscribeMessage) Unregister a subscription.
-
Method Details
-
registerSubscription
Register a subscription represented by the given message.- Parameters:
subscribeMessage- the subscription request
-
unregisterSubscription
Unregister a subscription.- Parameters:
unsubscribeMessage- the request to unsubscribe
-
unregisterAllSubscriptions
Remove all subscriptions associated with the given sessionId. -
findSubscriptions
Find all subscriptions that should receive the given message. The map returned is safe to iterate and will never be modified.- Parameters:
message- the message- Returns:
- a
MultiValueMapwith sessionId-subscriptionId pairs (possibly empty)
-