Package org.exoplatform.services.user
Class UserStateService
java.lang.Object
org.exoplatform.services.user.UserStateService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUserStateService(org.exoplatform.ws.frameworks.cometd.ContinuationService continuationService, org.exoplatform.services.cache.CacheService cacheService, org.exoplatform.commons.api.settings.SettingService settingService) -
Method Summary
Modifier and TypeMethodDescriptionvoidintgetDelay()Deprecated.Not needed anymore since we check connected users on WebSocket ChannelgetUserState(String userId) Return user connection statebooleanChecks whether a user is online or notonline()Deprecated.not needed anymore since the user online status is managed in realtime with WebSocket Channelvoidsave(UserStateModel model) Deprecated.usesaveStatus(String, String)insteadvoidsaveStatus(String userId, String status) Changes online status of the user: donotditurb, absent, available ...
-
Field Details
-
DEFAULT_STATUS
- See Also:
-
STATUS_OFFLINE
- See Also:
-
INVISIBLE
- See Also:
-
USER_STATE_CACHE_NAME
- See Also:
-
COMETD_CHANNEL
- See Also:
-
USER_STATUS_UPDATED
- See Also:
-
-
Constructor Details
-
UserStateService
public UserStateService(org.exoplatform.ws.frameworks.cometd.ContinuationService continuationService, org.exoplatform.services.cache.CacheService cacheService, org.exoplatform.commons.api.settings.SettingService settingService)
-
-
Method Details
-
online
- Returns:
ListofUserStateModelof online users
-
isOnline
Checks whether a user is online or not- Parameters:
userId- user name- Returns:
- true if user is still connected else false
-
getUserState
Return user connection state- Parameters:
userId- user name- Returns:
UserStateModel
-
lastLogin
- Returns:
- Last logged in user
-
saveStatus
Changes online status of the user: donotditurb, absent, available ...- Parameters:
userId- user namestatus- Status of the online user
-
getDelay
Deprecated.Not needed anymore since we check connected users on WebSocket Channel- Returns:
- default delay to consider user as inactive
-
save
Deprecated.usesaveStatus(String, String)insteadChanges user online/offline status- Parameters:
model-UserStateModel
-
ping
Deprecated.not needed anymore since the user online status is managed in realtime with WebSocket ChannelChanges user status to online and saves the last activity time- Parameters:
userId- user name- Returns:
- saved
UserStateModel
-
clearCache
public void clearCache()
-