// Path: CodeFrameworkDemo/CodeFramework/src/main/java/com/ecloud/androidcodeframework/codeframework/gson/GsonParse.java
// public class GsonParse extends GsonBaseParse {
// 
//     private Object bean;
// 
//     public GsonParse(String content) throws Exception {
//         super(content);
//     }
// 
//     /**
//      * 数据解析函数
//      * @param className 返回数据结构类名
//      * @throws Exception
//      */
//     @Override
//     protected void parse(Class<?> className) throws Exception {
//         ErrorBaseBean mErrorBaseBean;
//         mErrorBaseBean = GsonErrorParse.parse(content);
//         if(mErrorBaseBean.getCode() == AppServerConfig.CODE_SUCCESS){
//             Gson gson = new Gson();
//             bean = gson.fromJson(content, className);
//         }else{
//             bean = mErrorBaseBean;
//         }
//     }
// 
//     /**
//      * 获取HTTP返回数据结构
//      * @param className 返回数据结构类名
//      * @return Object
//      * @throws Exception
//      */
//     public Object getBean(Class<?> className) throws Exception {
//         parse(className);
//         return bean;
//     }
// }


import android.os.Handler;
import com.ecloud.androidcodeframework.codeframework.gson.GsonParse;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;
import java.util.List;
package com.ecloud.androidcodeframework.codeframework.thread;





/**
 * Author:    ZhuWenWu
 * Version    V1.0
 * Date:      14-3-16 下午7:42
 * Description:
 * Modification  History:
 * Date         	Author        		Version        	Discription
 * -----------------------------------------------------------------------------------
 * 14-3-16      ZhuWenWu            1.0                    1.0
 * Why & What is modified:
 */
public class GetDataRequestThread extends BaseThread {

    private Class<?> className;

    public GetDataRequestThread(Handler handler, int what, String url, List<BasicNameValuePair> param, Class<?> className,boolean isPost) {
        super(handler, what);
        this.className = className;
        setParams(url,param,isPost);
    }

    @Override
    public void run() {
        super.run();
        try {
// Path: CodeFrameworkDemo/CodeFramework/src/main/java/com/ecloud/androidcodeframework/codeframework/gson/GsonParse.java
// public class GsonParse extends GsonBaseParse {
// 
//     private Object bean;
// 
//     public GsonParse(String content) throws Exception {
//         super(content);
//     }
// 
//     /**
//      * 数据解析函数
//      * @param className 返回数据结构类名
//      * @throws Exception
//      */
//     @Override
//     protected void parse(Class<?> className) throws Exception {
//         ErrorBaseBean mErrorBaseBean;
//         mErrorBaseBean = GsonErrorParse.parse(content);
//         if(mErrorBaseBean.getCode() == AppServerConfig.CODE_SUCCESS){
//             Gson gson = new Gson();
//             bean = gson.fromJson(content, className);
//         }else{
//             bean = mErrorBaseBean;
//         }
//     }
// 
//     /**
//      * 获取HTTP返回数据结构
//      * @param className 返回数据结构类名
//      * @return Object
//      * @throws Exception
//      */
//     public Object getBean(Class<?> className) throws Exception {
//         parse(className);
//         return bean;
//     }
// }


// Path: CodeFrameworkDemo/CodeFramework/src/main/java/com/ecloud/androidcodeframework/codeframework/thread/GetDataRequestThread.java
import android.os.Handler;
import com.ecloud.androidcodeframework.codeframework.gson.GsonParse;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;
import java.util.List;

package com.ecloud.androidcodeframework.codeframework.thread;





/**
 * Author:    ZhuWenWu
 * Version    V1.0
 * Date:      14-3-16 下午7:42
 * Description:
 * Modification  History:
 * Date         	Author        		Version        	Discription
 * -----------------------------------------------------------------------------------
 * 14-3-16      ZhuWenWu            1.0                    1.0
 * Why & What is modified:
 */
public class GetDataRequestThread extends BaseThread {

    private Class<?> className;

    public GetDataRequestThread(Handler handler, int what, String url, List<BasicNameValuePair> param, Class<?> className,boolean isPost) {
        super(handler, what);
        this.className = className;
        setParams(url,param,isPost);
    }

    @Override
    public void run() {
        super.run();
        try {
            Object bean = new GsonParse(result).getBean(className);