Java-ServletRequestListener-ServletRequestAttributeListener

来源:互联网 发布:windows tts 语音库 编辑:程序博客网 时间:2024/04/30 11:30
   /**     * A ServletRequestListener can be implemented by the developer     * interested in being notified of requests coming in and out of     * scope in a web component. 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     *///Servlet请求监听器,开发者可以实现这个接口来监听请求进入或者离开web应用public interface ServletRequestListener extends EventListener {    /** The request is about to go out of scope of the web application. *///Request销毁监听    public void requestDestroyed ( ServletRequestEvent sre );    /** The request is about to come into scope of the web application. */    //Request初始化监听    public void requestInitialized ( ServletRequestEvent sre );}

  /**     * 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     *///servlet 请求参数监听器,开发者可以实现这个接口来通知属性的改变public interface ServletRequestAttributeListener extends EventListener {    /** Notification that a new attribute was added to the     ** servlet request. Called after the attribute is added.     *///属性添加监听    public void attributeAdded(ServletRequestAttributeEvent srae);    /** Notification that an existing attribute has been removed from the     ** servlet request. Called after the attribute is removed.     */    //属性删除监听    public void attributeRemoved(ServletRequestAttributeEvent srae);    /** Notification that an attribute was replaced on the     ** servlet request. Called after the attribute is replaced.     */    //属性替代监听    public void attributeReplaced(ServletRequestAttributeEvent srae);}

0 0
原创粉丝点击