深入struts2.0(七)--ActionInvocation接口以及3DefaultActionInvocation类
1.1.1 ActionInvocation类
ActionInvocation定义为一个接口。主要作用是表现action的运行状态。它拥有拦截器和action的实例。通过重复的运行invoke方法。首先被actionProxy,然后是拦截器,全部拦截器运行完后就是action和result .
图3.3.4 ActionInvocation类的主要方法
1.1.2 DefaultActionInvocation类
DefaultActionInvocation类是ActionInvocation接口的实现类. 一般都用该类实例化ActionInvocation。 基本的方法例如以下:
图3.3.5 DefaultActionInvocation类的主要方法
关键方法:invoke()方法
executed = false; 默觉得false。表示该action还没有运行。
假设运行就会抛出已经运行的异常。
然后推断拦截器是否已经配置,假设配置了拦截器就会从配置信息中获得拦截器配置类InterceptorMapping。
此类中仅仅包括两个属性,一个就是name和interceptor实例。
|
|
最新文章
- 参数名ASCII码从小到大排序(字典序)
- [Java] final的意义
- c# 产生随机字符串,包括大小写字母和数字
- Android 使用XmlSerializer生成xml文件
- java.lang.String内部结构的变化
- Sonar入门(二): Maven集成Sonar
- php 文件操作类
- Spire.Office for .NET(Word、Excel、PPT、PDF等)
- 访问mysql出现“Access denied for user root@localhost”(using password:NO)解决方案
- LeadTools答题卡识别方案
- JAVA_SE基础——56.包的创建
- saltstack主机管理项目:主机管理项目需求分析(一)
- Linux常用系统命令
- python基础--概念性问题
- React中禁止chrome填充密码表单
- 浅谈react受控组件与非受控组件
- otunnel : 一个和lcx差不多的端口转发的工具
- CF878C Tournament set 图论
- MLlib1.6指南笔记
- mongodb 3.4复制集配置