Name
HttpSessionBindingListener
Synopsis
Interface Name:
javax.servlet.http.HttpSessionBindingListener
Superinterface: java.util.EventListener
Immediate Subinterfaces: None
Implemented By: None
Availability: Servlet API 2.0 and later
Description
An object that implements
HttpSessionBindingListener is notified via calls
to valueBound( ) and valueUnbound( ) when it is bound to or unbound from an
HttpSession. Among other things, this interface
allows orderly cleanup session-specific resources, such as database
connections. Note that in a distributed environment the
valueBound( ) call may be made inside a different
JVM than the valueUnbound( ) call.
Interface Declaration
public interface HttpSessionBindingListener extends java.util.EventListener {
// Methods
public abstract void valueBound(HttpSessionBindingEvent event);
public abstract void valueUnbound(HttpSessionBindingEvent event);
}Methods
valueBound()
public abstract void valueBound(HttpSessionBindingEvent event)
- Description
Called when the listener is bound to a session.
valueUnbound()
public abstract void valueUnbound(HttpSessionBindingEvent event)
- Description
Called when the listener is unbound from a session (including at session destruction).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access