RichFaces Photoalbum 4.3.5.Final

org.richfaces.photoalbum.manager
Class LoggedUserTracker

java.lang.Object
  extended by org.richfaces.photoalbum.manager.LoggedUserTracker

@ApplicationScoped
public class LoggedUserTracker
extends Object

Special wrapper for Map, that contains pairs(userId, sessionId) to track what sessionId is actual by specified user. Used to determine need to expire user's session, that session's id not equal to stored in this map.

Author:
Andrey Markhel

Constructor Summary
LoggedUserTracker()
           
 
Method Summary
 void addUserId(Long id, String sessionId)
          Add user id and session id to store after each successfull authentication.
 boolean containsUser(Long id, String sessionId)
          Checks if in the store contained user with specified user id and session id
 boolean containsUserId(Long id)
          Checks if in the store contained user with specified user id
 void removeUserId(Long id)
          Remove user id from store after each logout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggedUserTracker

public LoggedUserTracker()
Method Detail

addUserId

public void addUserId(Long id,
                      String sessionId)
Add user id and session id to store after each successfull authentication. Last authentication will be current

Parameters:
id - - user id to add
sessionId - - sessionId

removeUserId

public void removeUserId(Long id)
Remove user id from store after each logout

Parameters:
id - - user id to remove

containsUser

public boolean containsUser(Long id,
                            String sessionId)
Checks if in the store contained user with specified user id and session id

Parameters:
id - - user id to check
sessionId - - session id to check
Returns:
true if such user contained in the store, that indicating that current user is actual.

containsUserId

public boolean containsUserId(Long id)
Checks if in the store contained user with specified user id

Parameters:
id - - user id to check
Returns:
true if user with specified id contained in the store

RichFaces Photoalbum 4.3.5.Final

Copyright © 2014 JBoss by Red Hat. All Rights Reserved.