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) |
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) |
void |
registerSubscription(Message<?> message)
Register a subscription represented by the given message.
|
protected abstract void |
removeSubscriptionInternal(String sessionId,
String subscriptionId,
Message<?> message) |
void |
unregisterSubscription(Message<?> message)
Unregister a subscription.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
unregisterAllSubscriptions
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 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)
protected abstract MultiValueMap<String,String> findSubscriptionsInternal(String destination, Message<?> message)