博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
8个监听者与监听者接口
阅读量:4112 次
发布时间:2019-05-25

本文共 981 字,大约阅读时间需要 3 分钟。

 

 

 

                                                   场景                                                   监听者接口                     事件类型    

 

想 知道一个 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

 

 

 

转载地址:http://hiesi.baihongyu.com/

你可能感兴趣的文章
linux进程监控和自动重启的简单实现
查看>>
OpenFeign学习(三):OpenFeign配置生成代理对象
查看>>
OpenFeign学习(四):OpenFeign的方法同步请求执行
查看>>
OpenFeign学习(五):OpenFeign请求结果处理及重试控制
查看>>
OpenFeign学习(六):OpenFign进行表单提交参数或传输文件
查看>>
OpenFeign学习(七):Spring Cloud OpenFeign的使用
查看>>
Ribbon 学习(二):Spring Cloud Ribbon 加载配置原理
查看>>
Ribbon 学习(三):RestTemplate 请求负载流程解析
查看>>
深入理解HashMap
查看>>
XML生成(一):DOM生成XML
查看>>
XML生成(三):JDOM生成
查看>>
Ubuntu Could not open lock file /var/lib/dpkg/lock - open (13:Permission denied)
查看>>
collect2: ld returned 1 exit status
查看>>
C#入门
查看>>
查找最大值最小值
查看>>
C#中ColorDialog需点两次确定才会退出的问题
查看>>
数据库
查看>>
nginx反代 499 502 bad gateway 和timeout
查看>>
linux虚拟机安装tar.gz版jdk步骤详解
查看>>
python猜拳游戏
查看>>