@Test public void testRetrieveSubscriptionsByToken() throws Exception { Subscription expectedSubscription = new Subscription(null, SUBSCRIPTION_ID, TOPIC, ACK); Set<Subscription> expectedSubscriptions = new TreeSet<Subscription>(); expectedSubscriptions.add(expectedSubscription); Set<Subscription> subscriptions = subscriptionManager.retrieveSubscriptionsByTopic(TOPIC); assertTrue(subscriptions.size() > 0); assertEquals(expectedSubscriptions, subscriptions); }
public synchronized Map<Long, Subscription> retrieveSubscriptionsByToken(String clientSessionToken) { return clientsSubscriptions.get(clientSessionToken); }
SubscriptionManager { public synchronized Map<Long, Subscription> retrieveSubscriptionsByToken(String clientSessionToken) { return clientsSubscriptions.get(clientSessionToken); } }
SubscriptionManager { public synchronized Map<Long, Subscription> retrieveSubscriptionsByToken(String clientSessionToken) { return clientsSubscriptions.get(clientSessionToken); } private  SubscriptionManager(); }
SubscriptionManager { public synchronized Map<Long, Subscription> retrieveSubscriptionsByToken(String clientSessionToken) { return clientsSubscriptions.get(clientSessionToken); } private  SubscriptionManager(); static SubscriptionManager getInstance(); synchronized Set<Subscription> retrieveSubscriptionsByTopic(String topic); synchronized Map<Long, Subscription> retrieveSubscriptionsByToken(String clientSessionToken); synchronized Subscription addSubscription(Channel channel, String clientSessionToken, Long subscriptionId,
			String topic, Ack ackMode); synchronized boolean removeSubscription(String clientSessionToken, Long subscriptionId); synchronized boolean removeSubscriptions(String clientSessionToken); }
SubscriptionManager { public synchronized Map<Long, Subscription> retrieveSubscriptionsByToken(String clientSessionToken) { return clientsSubscriptions.get(clientSessionToken); } private  SubscriptionManager(); static SubscriptionManager getInstance(); synchronized Set<Subscription> retrieveSubscriptionsByTopic(String topic); synchronized Map<Long, Subscription> retrieveSubscriptionsByToken(String clientSessionToken); synchronized Subscription addSubscription(Channel channel, String clientSessionToken, Long subscriptionId,
			String topic, Ack ackMode); synchronized boolean removeSubscription(String clientSessionToken, Long subscriptionId); synchronized boolean removeSubscriptions(String clientSessionToken);  }