ServletRequestAttributeListener (Java EE 5)

Java EE API


javax.servlet Interface ServletRequestAttributeListener

All Superinterfaces:
EventListener

public interface ServletRequestAttributeListener
extends EventListener

Implements: java.util.EventListener

ServletRequestAttributeListener 可由想要在请求属性更改时获得通知的开发人员实现。当请求位于注册了该侦听器的 Web 应用程序范围中时,将生成通知。当请求即将进入每个 Web 应用程序中的第一个 servlet 或过滤器时,该请求将被定义为进入范围,当它退出链中的最后一个 servlet 或第一个过滤器时,它将被定义为超出范围。
英文文档:

A ServletRequestAttributeListener can be implemented by the developer interested in being notified of request attribute changes. Notifications will be generated while the request is within the scope of the web application in which the listener is registered. A request is defined as coming into scope when it is about to enter the first servlet or filter in each web application, as going out of scope when it exits the last servlet or the first filter in the chain.

Since:
Servlet 2.4

Method Summary
 void
 void
 void
 

Method Detail

public void attributeAdded(ServletRequestAttributeEvent srae)
通知向 servlet 请求添加了一个新属性。在添加属性之后调用。
英文文档:

attributeAdded

void attributeAdded(ServletRequestAttributeEvent srae)
Notification that a new attribute was added to the servlet request. Called after the attribute is added.


public void attributeRemoved(ServletRequestAttributeEvent srae)
通知现有属性已从 servlet 请求中移除。在移除属性之后调用。
英文文档:

attributeRemoved

void attributeRemoved(ServletRequestAttributeEvent srae)
Notification that an existing attribute has been removed from the servlet request. Called after the attribute is removed.


public void attributeReplaced(ServletRequestAttributeEvent srae)
通知已替换 servlet 请求中的一个属性。在替换属性之后调用。
英文文档:

attributeReplaced

void attributeReplaced(ServletRequestAttributeEvent srae)
Notification that an attribute was replaced on the servlet request. Called after the attribute is replaced.



Submit a bug or feature

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

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

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