Class InMemoryUserSubscriptionService
java.lang.Object
com.flowable.engage.engine.impl.profile.subscription.InMemoryUserSubscriptionService
- All Implemented Interfaces:
UserSubscriptionService
An in memory user subscription service. This would only work on one node.
- Author:
- Filip Hrisafov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindSubscriptionsTo
(String userId) Find all the user(s) that have the user withuserId
in their subscriptionsvoid
subscribe
(String userId, String sessionId, Collection<String> userIds) Subscribe the user withuserId
in the sessionsessionId
to the users withuserIds
.void
unSubscribe
(String userId, String sessionId) Remove the subscription for the user with the given id and the given session.
-
Constructor Details
-
InMemoryUserSubscriptionService
public InMemoryUserSubscriptionService()
-
-
Method Details
-
subscribe
Description copied from interface:UserSubscriptionService
Subscribe the user withuserId
in the sessionsessionId
to the users withuserIds
. If a subscription already exists then the existing user ids are replaced with the passeduserIds
- Specified by:
subscribe
in 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
Description copied from interface:UserSubscriptionService
Remove the subscription for the user with the given id and the given session.- Specified by:
unSubscribe
in interfaceUserSubscriptionService
- Parameters:
userId
- the id of the user that is being un-subscribedsessionId
- the id of the session that is being un-subscribed
-
findSubscriptionsTo
Description copied from interface:UserSubscriptionService
Find all the user(s) that have the user withuserId
in their subscriptions- Specified by:
findSubscriptionsTo
in interfaceUserSubscriptionService
- Parameters:
userId
- the id of the user- Returns:
- all the user(s) that have the user with
userId
in their subscriptions
-