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).