November 1998
Intermediate to advanced
526 pages
14h 38m
English
HttpSessionBindingListener
Interface Name: javax.servlet.http.HttpSessionBindingListener
Superinterface: java.util.EventListener
Immediate Subinterfaces: None
Implemented By: None
Availability: New as of the Servlet API 2.0; found in JSDK 2.0, JWS 1.1
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.
public interface HttpSessionBindingListener extends java.util.EventListener {
// Methods
public abstract void valueBound(HttpSessionBindingEvent event);
public abstract void valueUnbound(HttpSessionBindingEvent event);
}public abstract void valueBound(HttpSessionBindingEvent event)
Called when the listener is bound to a session.
public abstract void valueUnbound(HttpSessionBindingEvent event)
Called when the listener is unbound from a session (including at session destruction).