public abstract class AbstractSubscriptionRegistry extends Object implements SubscriptionRegistry
SubscriptionRegistry
that
looks up information in messages but delegates to abstract methods for the
actual storage and retrieval.Constructor and Description |
---|
AbstractSubscriptionRegistry() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addSubscriptionInternal(String sessionId,
String subscriptionId,
String destination,
Message<?> message) |
org.springframework.util.MultiValueMap<String,String> |
findSubscriptions(Message<?> message)
Find all subscriptions that should receive the given message.
|
protected abstract org.springframework.util.MultiValueMap<String,String> |
findSubscriptionsInternal(String destination,
Message<?> message) |
void |
registerSubscription(Message<?> message)
Register a subscription represented by the given message.
|
protected abstract void |
removeSubscriptionInternal(String sessionId,
String subscriptionId,
Message<?> message) |
abstract void |
unregisterAllSubscriptions(String sessionId)
Remove all subscriptions associated with the given sessionId.
|
void |
unregisterSubscription(Message<?> message)
Unregister a subscription.
|
protected final Log logger
public final void registerSubscription(Message<?> message)
SubscriptionRegistry
registerSubscription
in interface SubscriptionRegistry
message
- the subscription requestpublic final void unregisterSubscription(Message<?> message)
SubscriptionRegistry
unregisterSubscription
in interface SubscriptionRegistry
message
- the request to unsubscribepublic final org.springframework.util.MultiValueMap<String,String> findSubscriptions(Message<?> message)
SubscriptionRegistry
findSubscriptions
in interface SubscriptionRegistry
message
- the messageMultiValueMap
with sessionId-subscriptionId pairs,
possibly empty.protected abstract void addSubscriptionInternal(String sessionId, String subscriptionId, String destination, Message<?> message)
protected abstract void removeSubscriptionInternal(String sessionId, String subscriptionId, Message<?> message)
public abstract void unregisterAllSubscriptions(String sessionId)
SubscriptionRegistry
unregisterAllSubscriptions
in interface SubscriptionRegistry