SessionListenerAdapter

Simple adapter implementation of the {@link SessionListener} interface, effectively providing no-op implementations of all methods.

Members

Functions

onExpiration
void onExpiration(Session session)

Adapter no-op implementation - does nothing and returns immediately.

onStart
void onStart(Session session)

Adapter no-op implementation - does nothing and returns immediately.

onStop
void onStop(Session session)

Adapter no-op implementation - does nothing and returns immediately.

Inherited Members

From SessionListener

onStart
void onStart(Session session)

Notification callback that occurs when the corresponding Session has started.

onStop
void onStop(Session session)

Notification callback that occurs when the corresponding Session has stopped, either programmatically via {@link Session#stop} or automatically upon a subject logging out.

onExpiration
void onExpiration(Session session)

Notification callback that occurs when the corresponding Session has expired. <p/> <b>Note</b>: this method is almost never called at the exact instant that the {@code 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. <p/> If you need to perform time-based logic when a session expires, it is best to write it based on the session's {@link hunt.shiro.session.Session#getLastAccessTime() lastAccessTime} and <em>not</em> the time when this method is called.

Meta