public interface SessionListener
Session's life cycle.| Modifier and Type | Method and Description |
|---|---|
void |
onExpiration(Session session)
Notification callback that occurs when the corresponding Session has expired.
|
void |
onStart(Session session)
Notification callback that occurs when the corresponding Session has started.
|
void |
onStop(Session session)
Notification callback that occurs when the corresponding Session has stopped, either programmatically via
Session.stop() or automatically upon a subject logging out. |
void onStart(Session session)
session - the session that has started.void onStop(Session session)
Session.stop() or automatically upon a subject logging out.session - the session that has stopped.void onExpiration(Session session)
Session expires. Almost all
session management systems, including Shiro's implementations, lazily validate sessions - either when they
are accessed or during a regular validation interval. It would be too resource intensive to monitor every
single session instance to know the exact instant it expires.
If you need to perform time-based logic when a session expires, it is best to write it based on the
session's lastAccessTime and not the time
when this method is called.session - the session that has expired.Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.