Class InMemoryUserSubscriptionService
- java.lang.Object
-
- com.flowable.engage.engine.impl.profile.subscription.InMemoryUserSubscriptionService
-
- All Implemented Interfaces:
UserSubscriptionService
public class InMemoryUserSubscriptionService extends Object implements UserSubscriptionService
An in memory user subscription service. This would only work on one node.- Author:
- Filip Hrisafov
-
-
Constructor Summary
Constructors Constructor Description InMemoryUserSubscriptionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>findSubscriptionsTo(String userId)Find all the user(s) that have the user withuserIdin their subscriptionsvoidsubscribe(String userId, String sessionId, Collection<String> userIds)Subscribe the user withuserIdin the sessionsessionIdto the users withuserIds.voidunSubscribe(String userId, String sessionId)Remove the subscription for the user with the given id and the given session.
-
-
-
Method Detail
-
subscribe
public void subscribe(String userId, String sessionId, Collection<String> userIds)
Description copied from interface:UserSubscriptionServiceSubscribe the user withuserIdin the sessionsessionIdto the users withuserIds. If a subscription already exists then the existing user ids are replaced with the passeduserIds- Specified by:
subscribein interfaceUserSubscriptionService- Parameters:
userId- the id of the user to which the subscription belongs tosessionId- the id of the session in which the user is subscribed touserIds- the ids of all the users that the user is subscribed to
-
unSubscribe
public void unSubscribe(String userId, String sessionId)
Description copied from interface:UserSubscriptionServiceRemove the subscription for the user with the given id and the given session.- Specified by:
unSubscribein interfaceUserSubscriptionService- Parameters:
userId- the id of the user that is being un-subscribedsessionId- the id of the session that is being un-subscribed
-
findSubscriptionsTo
public Collection<String> findSubscriptionsTo(String userId)
Description copied from interface:UserSubscriptionServiceFind all the user(s) that have the user withuserIdin their subscriptions- Specified by:
findSubscriptionsToin interfaceUserSubscriptionService- Parameters:
userId- the id of the user- Returns:
- all the user(s) that have the user with
userIdin their subscriptions
-
-