JSecurity

org.jsecurity.session
Interface SessionListenerRegistrar

All Known Implementing Classes:
AbstractSessionManager, AbstractValidatingSessionManager, DefaultSecurityManager, DefaultSessionManager, DefaultWebSecurityManager, DefaultWebSessionManager, ServletContainerSessionManager, SessionsSecurityManager

public interface SessionListenerRegistrar

A SessionListenerRegistrar is a component that is capable of registering interested SessionListeners that wish to be notified during Session lifecycle events.

This interface only guarantees that registered listeners will be notified during a Session's lifecycle. How that notification occurs is implementation specific (e.g. iteration over a collection of listeners, JMS, etc.).

Since:
0.9
Author:
Les Hazlewood

Method Summary
 void add(SessionListener listener)
          Registeres a single listener that wishes to be notified during Session lifecycles.
 boolean remove(SessionListener listener)
          Removes a single listener that no longer wishes to be notified during Session lifecycles.
 void setSessionListeners(Collection<SessionListener> listeners)
          Sets the SessionListener(s) that wish to be notified during Session lifecycles.
 

Method Detail

setSessionListeners

void setSessionListeners(Collection<SessionListener> listeners)
Sets the SessionListener(s) that wish to be notified during Session lifecycles.

Parameters:
listeners - one or more SessionListeners that should be notified during Session lifecycles.

add

void add(SessionListener listener)
Registeres a single listener that wishes to be notified during Session lifecycles.

Parameters:
listener - the single listener that wishes to be notified during Session lifecycles.

remove

boolean remove(SessionListener listener)
Removes a single listener that no longer wishes to be notified during Session lifecycles.

Parameters:
listener - the single listener that no longer wishes to be notified during Session lifecycles.
Returns:
true if the listener was removed (i.e. it was previously registered), or false if the listener was not removed (i.e. it wasn't registered yet, effectively a no-op).

JSecurity

Copyright © 2004-2008 JSecurity.