org.riotfamily.common.web.util
Class SessionReferenceRemover
java.lang.Object
org.riotfamily.common.web.util.SessionReferenceRemover
- All Implemented Interfaces:
- EventListener, HttpSessionBindingListener
public class SessionReferenceRemover
- extends Object
- implements HttpSessionBindingListener
Utility class that removes a value from a collection when the HTTP session
is invalidated.
Use this class if you need to keep a global reference to an object that is
bound to a user's session.
- Since:
- 6.4
- Author:
- Felix Gnass [fgnass at neteye dot de]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
valueBound
public void valueBound(HttpSessionBindingEvent event)
- Specified by:
valueBound
in interface HttpSessionBindingListener
valueUnbound
public void valueUnbound(HttpSessionBindingEvent event)
- Specified by:
valueUnbound
in interface HttpSessionBindingListener
removeFromCollectionOnInvalidation
public static void removeFromCollectionOnInvalidation(HttpSession session,
Collection<?> collection,
Object value)
- Removes the given value from the collection when the session is
invalidated.