public abstract class AbstractSubscriptionRegistry extends java.lang.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(java.lang.String sessionId,
java.lang.String subscriptionId,
java.lang.String destination,
Message<?> message) |
MultiValueMap<java.lang.String,java.lang.String> |
findSubscriptions(Message<?> message)
Find all subscriptions that should receive the given message.
|
protected abstract MultiValueMap<java.lang.String,java.lang.String> |
findSubscriptionsInternal(java.lang.String destination,
Message<?> message) |
void |
registerSubscription(Message<?> message)
Register a subscription represented by the given message.
|
protected abstract void |
removeSubscriptionInternal(java.lang.String sessionId,
java.lang.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<java.lang.String,java.lang.String> findSubscriptions(Message<?> message)
SubscriptionRegistry
findSubscriptions
in interface SubscriptionRegistry
message
- the messageMultiValueMap
with sessionId-subscriptionId pairs,
possibly empty.protected abstract void addSubscriptionInternal(java.lang.String sessionId, java.lang.String subscriptionId, java.lang.String destination, Message<?> message)
protected abstract void removeSubscriptionInternal(java.lang.String sessionId, java.lang.String subscriptionId, Message<?> message)
protected abstract MultiValueMap<java.lang.String,java.lang.String> findSubscriptionsInternal(java.lang.String destination, Message<?> message)