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.Modifier and Type | Field and Description |
---|---|
protected Log |
logger |
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) |
abstract void |
unregisterAllSubscriptions(java.lang.String sessionId)
Remove all subscriptions associated with the given sessionId.
|
void |
unregisterSubscription(Message<?> message)
Unregister a subscription.
|
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)
public abstract void unregisterAllSubscriptions(java.lang.String sessionId)
SubscriptionRegistry
unregisterAllSubscriptions
in interface SubscriptionRegistry
protected abstract MultiValueMap<java.lang.String,java.lang.String> findSubscriptionsInternal(java.lang.String destination, Message<?> message)