|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SessionListener
Interface to be implemented by components that wish to be notified of events that occur during a
Session
's life cycle.
Method Summary | |
---|---|
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. |
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |