HttpSessionBindingListener

Java Servlet Programming, 2nd Edition > B. HTTP Servlet API Quick Reference > HttpSessionBindingListener

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


Last updated on 3/20/2003
Java Servlet Programming, 2nd Edition, © 2001 O'Reilly

< BACKCONTINUE >


Java servlet programming
Java Servlet Programming (Java Series)
ISBN: 0596000405
EAN: 2147483647
Year: 2000
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net