Class UserStateService


  • public class UserStateService
    extends Object
    • Constructor Detail

      • UserStateService

        public UserStateService​(org.mortbay.cometd.continuation.EXoContinuationBayeux eXoContinuationBayeux,
                                org.exoplatform.services.cache.CacheService cacheService)
    • Method Detail

      • isOnline

        public boolean isOnline​(String userId)
        Checks whether a user is online or not
        Parameters:
        userId - user name
        Returns:
        true if user is still connected else false
      • lastLogin

        public UserStateModel lastLogin()
        Returns:
        Last logged in user
      • saveStatus

        public void saveStatus​(String userId,
                               String status)
        Changes online status of the user: donotditurb, absent, available ...
        Parameters:
        userId - user name
        status - Status of the online user
      • getDelay

        @Deprecated
        public int getDelay()
        Deprecated.
        Not needed anymore since we check connected users on WebSocket Channel
        Returns:
        default delay to consider user as inactive
      • ping

        @Deprecated
        public UserStateModel ping​(String userId)
        Deprecated.
        not needed anymore since the user online status is managed in realtime with WebSocket Channel
        Changes user status to online and saves the last activity time
        Parameters:
        userId - user name
        Returns:
        saved UserStateModel
      • clearCache

        public void clearCache()