HttpSessionBindingListener (Java EE 5)

Java EE API


javax.servlet.http Interface HttpSessionBindingListener

All Superinterfaces:
EventListener

public interface HttpSessionBindingListener
extends EventListener

Implements: java.util.EventListener

使对象在被绑定到会话或从会话中取消对它的绑定时得到通知。该对象通过 HttpSessionBindingEvent 对象得到通知。这可能是 servlet 编程人员显式从会话中取消绑定某个属性的结果(由于会话无效,或者由于会话超时)。
英文文档:

Causes an object to be notified when it is bound to or unbound from a session. The object is notified by an HttpSessionBindingEvent object. This may be as a result of a servlet programmer explicitly unbinding an attribute from a session, due to a session being invalidated, or due to a session timing out.

Author:
Various
See Also:
HttpSession, HttpSessionBindingEvent

Method Summary
 void
 void
 

Method Detail

public void valueBound(HttpSessionBindingEvent event)
通知对象它将被绑定到某个会话并标识该会话。
event 标识会话的事件
See also valueUnbound
英文文档:

valueBound

void valueBound(HttpSessionBindingEvent event)
Notifies the object that it is being bound to a session and identifies the session.

Parameters:
event - the event that identifies the session
See Also:
valueUnbound(javax.servlet.http.HttpSessionBindingEvent)

public void valueUnbound(HttpSessionBindingEvent event)
通知对象要从某个会话中取消对它的绑定并标识该会话。
event 标识会话的事件
See also valueBound
英文文档:

valueUnbound

void valueUnbound(HttpSessionBindingEvent event)
Notifies the object that it is being unbound from a session and identifies the session.

Parameters:
event - the event that identifies the session
See Also:
valueBound(javax.servlet.http.HttpSessionBindingEvent)


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!