struts2的ActionProxy接口分析
来源:互联网 发布:网络电视看电视台软件 编辑:程序博客网 时间:2024/06/01 08:17
ActionProxy是XWork和要执行的action之间额外的一层,如此一来就可以使用不同的代理。比如,可以
使用远程代理,例如RMI或SOAP等
ActionProxyFactory用来生成ActionProxy代理的实例(工厂模式)。
ActionProxy接口的默认实现类是DefaultActionProxy(下面是部分代码)。该最重要的是execute方法,
该方法最重要的作用是调用ActionInvocation实例的invoke方法,从而进入struts2框架的拦截器进行拦截处
理和调用action方法。
public class DefaultActionProxy implements ActionProxy, Serializable { public String execute() throws Exception { ActionContext nestedContext = ActionContext.getContext(); ActionContext.setContext(invocation.getInvocationContext()); String retCode = null; String profileKey = "execute: "; try { UtilTimerStack.push(profileKey); retCode = invocation.invoke();//调用ActionInvocation实例的invoke方法,进行拦截器的处理或action方法 } finally { if (cleanupContext) { ActionContext.setContext(nestedContext); } UtilTimerStack.pop(profileKey); } return retCode; }}
0 0
- struts2的ActionProxy接口分析
- struts2创建ActionProxy过程
- struts2的ActionSupport接口分析
- 深入struts2.0(六)--ActionProxy类
- Struts2(九)---简述ActionProxy和ActionInvocation
- java高级工程师-----struts的ActionProxy
- Struts2接口之ModelDriven分析
- Struts2的Preparable接口
- struts2的ModelDriven接口
- Struts2的Preparable接口
- Struts2的Preparable接口
- Struts2的Preparable接口
- Struts2的Preparable接口
- Struts2的Preparable接口
- struts2 Preparable 接口的使用
- Structs ActionProxy深度阅读
- 接口协议的分析
- Struts2 源码分析——配置管理之PackageProvider接口
- 备份Ubuntu的工具—Remastersys
- java 将TXT中数据插入数据库
- svn 创建分支简单方法
- BT656/BT601/BT1120协议以及DM365/DM355/DM6467上使用的YUV颜色空间说明
- Filtering Catalogs
- struts2的ActionProxy接口分析
- Java中的异常、断言、日志 log4j
- 猕猴桃
- dom4j解析xml字符串
- 正则表达式汇总
- 搭建简单的Web API项目、Web API的调用方式
- 设置Myeclipse的jsp文件默认打开方式
- Java 7之基础类型第5篇 - Java字符串类型
- Oracle索引内部结构研究