星空网 > 软件开发 > ASP.net

Atitit.wrmiwebrmi框架新特性

Atitit.wrmi web rmi框架新特性

 

1. V1d  新特性1

1.1. 增加了精确参数1

1.2. 增加了req参数,命名参数模式。。1

1.3. 增加了globale  传递隐含参数req resp等1

1.4. Cs bs两个版本的实现1

2. V2 新特性2

2.1. $req对象预定义参数的支持2

2.2. 动态ioc   IocXq2142

2.3. end4

 

 

1. V1d  新特性

1.1. 增加了精确参数

1.2. 增加了req参数,命名参数模式。。

增加了对req参数的处理

var mp=$("form").serialize();

  mp=mp+"&$method=com.attilax.bet.BetService.bet&$callback=get_posts_callback¶m1=$req";

 

1.3. 增加了globale  传递隐含参数req resp等

1.4. Cs bs两个版本的实现

作者:: 绰号:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿尔 拉帕努伊 ) 汉字名:艾龙,  EMAIL:1466519819@qq.com

转载请注明来源: http://www.cnblogs.com/attilax/

 

2. V2 新特性

2.1. $req对象预定义参数的支持

2.2. 动态ioc   IocXq214

 

 

 

package com.attilax.wrmi;

 

import java.util.ArrayList;

import java.util.List;

import java.util.Map;

 

import javax.servlet.http.HttpServletRequest;

 

import org.apache.commons.lang3.reflect.ConstructorUtils;

import org.apache.commons.lang3.reflect.MethodUtils;

 

 

 

//import com.attilaax.encode.EncodeX;   sould recomm q229 ati

import com.attilax.core;

import com.attilax.ioc.IocXq214;

import com.attilax.lang.Global;

import com.attilax.lang.ParamX;

import com.attilax.ref.refx;

import com.attilax.web.ReqX;

import com.google.common.collect.Maps;

 

 

/**

 * $method=com.attilax.jsna.test.add

 * @author Administrator

 *

 */

public class Wrmi {

 

/**

 * def output raw type ..if list map object use json fmt

 * 

 * @param req

 * @return

 */

@SuppressWarnings("all")

public String exe(Map m) {

//Map m=Maps.newLinkedHashMap();

//if(req2 instanceof String)  //cs envi 

//  m = new ParamX().urlParams2Map((String) req2);

// 

 

 

Object[] params_objArr = getParamsArr(m);

String meth = (String) m.get("$method"); 

String classname = refx.getClassName(meth);

String meth_name = refx.getMethodName(meth);

 

 

Object o;

 

try {

// String apptype=System.getProperty("apptype");

o =  IocXq214.getBean(classname);

Object invokeMethod_ret = com.attilax.reflect.MethodUtils.invokeMethod(o, meth_name,

params_objArr);

String ret = "";

if (invokeMethod_ret instanceof String)

ret = (String) invokeMethod_ret;

if (invokeMethod_ret instanceof Integer || invokeMethod_ret instanceof Double)

ret =  invokeMethod_ret.toString();

else

ret = core.toJsonStrO88(invokeMethod_ret);

 

return ret;

} catch (Throwable e) {

e.printStackTrace();

return core.toJsonStrO88(e);

 

}

 

}

 

private Object[] getParamsArr(Map m) {

List paras_li = new ArrayList();

//m.get("param")

if (m.get("param") != null)

paras_li.add(convertReqObjParams( m.get("param")));

for (int i = 0; i < 7; i++) {

String param_index = "param" + String.valueOf(i);

if (m.get(param_index) != null)

paras_li.add(convertReqObjParams(m.get(param_index)));

 

}

Object[] params_objArr = paras_li.toArray();

return params_objArr;

}

 

private Object convertReqObjParams(Object object) {

if(object.toString().trim().equals("$req"))

return Global.req.get();

return object;

}

 

 

 

}

 

 

2.3. end

 




原标题:Atitit.wrmiwebrmi框架新特性

关键词:web

web
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

巴西海运港口有哪些:https://www.goluckyvip.com/tag/28706.html
巴西海运双清:https://www.goluckyvip.com/tag/28707.html
巴西海运线:https://www.goluckyvip.com/tag/28708.html
巴西海运运费:https://www.goluckyvip.com/tag/28709.html
沙特外汇管制:https://www.goluckyvip.com/tag/2871.html
巴西海运专线:https://www.goluckyvip.com/tag/28710.html
去日本入住酒店,东西随意用却有一个特殊“要:https://www.vstour.cn/a/411241.html
中国有哪些著名的酒店品牌。:https://www.vstour.cn/a/411242.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流