Package ch.rasc.wamp2spring.pubsub
Class SubscriptionRegistry
java.lang.Object
ch.rasc.wamp2spring.pubsub.SubscriptionRegistry
In memory subscription registry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncountSubscribers(long subscriptionId) Returns the number of sessions currently attached to the subscription.getMatchSubscriptions(String topic) Returns a list of IDs of subscriptions matching a topic URI, irrespective of match policy.getSubscription(long subscriptionId) Returns information on a particular subscription.booleanhasSubscribers(String topic) Checks if a particular topic currently has attached subscriptionslistSubscribers(long subscriptionId) Returns a list of session IDs for sessions currently attached to the subscription.Returns subscription IDs listed according to matching policies.lookupSubscription(String topic, MatchPolicy matchPolicy) Returns the subscription ID (if any) managing a topic, according to the matching policy.
-
Constructor Details
-
SubscriptionRegistry
public SubscriptionRegistry()
-
-
Method Details
-
listSubscriptions
Returns subscription IDs listed according to matching policies.- Returns:
- subscription IDs grouped by matching policies
-
lookupSubscription
Returns the subscription ID (if any) managing a topic, according to the matching policy.- Parameters:
topic- the topic URImatchPolicy- the matching policy- Returns:
- the subscription id or null if no matching subscription exist
-
getMatchSubscriptions
Returns a list of IDs of subscriptions matching a topic URI, irrespective of match policy.- Parameters:
topic- the topic URI- Returns:
- the list of session IDs subscribed to the topic
-
getSubscription
Returns information on a particular subscription.- Parameters:
subscriptionId- the id of the subscription- Returns:
- the detail about the requested subscription. null when the subscription does not exist.
-
listSubscribers
Returns a list of session IDs for sessions currently attached to the subscription.- Parameters:
subscriptionId- the id of the subscription- Returns:
- the list of session IDs attached to the subscription
-
countSubscribers
Returns the number of sessions currently attached to the subscription.- Parameters:
subscriptionId- the subscription id- Returns:
- the number of subscriptions or null when the subscription does not exist.
-
hasSubscribers
Checks if a particular topic currently has attached subscriptions- Parameters:
topic- the topic- Returns:
- true if currently sessions are attached to the topic
-