8个监听者与监听者接口

 

 

 

                                                   场景                                                  监听者接口                    事件类型    

 

想 知道一个 Web应用上下问中 是否增加,删除或替换了一个属性. ServletContextAttributeListener  (attributeAdded,attributeRemoved,attributeReplaced) ServletContextAttributeEvent
你想知道有多少个并发用户,也就是说想跟踪活动的会话 .HttpSessionListener(sessionCreated, sessionDestroyed)  HttpSessionEvent
每次请求到来时想知道以便建立日志记录. ServletRequestListener     (requestlnitialized,requestDestroyed)  ServletRequestEvent
  你想知道什么时候增加,删除或替换一个请求属性.   ServletRequestAttributeListener(attributeAdded,attributeRemoved,attributeReplaced)    ServletRequestAttributeEvent
 你有一个属性类(这个类表示的对象 将被放在一个属性中),而且你希望这个类型的对象绑定到一个会话或者会话删除时得到通知.   HttpSessionBindingListener(valueBound,valueUnbound)   HttpSessionBindingEvent
 你想知道什么时候增加,删除或替换一个会话属性.   HttpSessionAttributeListener(attributeAdded,attributeRemoved,attributeReplaced)    HttpSessionBindingEvent
 你想知道是否粗行间或撤销了一个上下文.  ServletContextListener(contextlnitialized,contextDestroyed)   ServletContextEvent
  你有一个属性类,而且希望此类对象绑定的会话迁移到另一个JVM时得到通知.  SessionActivationListener(sessionDidActivate,sessionWillPassivate)  HttpSessionEvent

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值