Class InMemoryUserSubscriptionService

    • Constructor Detail

      • InMemoryUserSubscriptionService

        public InMemoryUserSubscriptionService()
    • Method Detail

      • subscribe

        public void subscribe​(String userId,
                              String sessionId,
                              Collection<String> userIds)
        Description copied from interface: UserSubscriptionService
        Subscribe the user with userId in the session sessionId to the users with userIds. If a subscription already exists then the existing user ids are replaced with the passed userIds
        Specified by:
        subscribe in interface UserSubscriptionService
        Parameters:
        userId - the id of the user to which the subscription belongs to
        sessionId - the id of the session in which the user is subscribed to
        userIds - the ids of all the users that the user is subscribed to
      • unSubscribe

        public void unSubscribe​(String userId,
                                String sessionId)
        Description copied from interface: UserSubscriptionService
        Remove the subscription for the user with the given id and the given session.
        Specified by:
        unSubscribe in interface UserSubscriptionService
        Parameters:
        userId - the id of the user that is being un-subscribed
        sessionId - the id of the session that is being un-subscribed