// Path: qshttp/src/main/java/org/song/http/framework/ability/HttpCallback.java
// public interface HttpCallback {
// 
//     void onSuccess(ResponseParams response);
// 
//     void onFailure(HttpException e);
// 
// }
// 
// Path: qshttp/src/main/java/org/song/http/framework/ability/HttpCallbackEx.java
// public interface HttpCallbackEx extends HttpCallback {
// 
//     void onStart();
// 
//     void onEnd();
// 
//     //返回true 则不会回调
//     boolean isDestroy();
// }
// 
// Path: qshttp/src/main/java/org/song/http/framework/ability/IHttpProgress.java
// public interface IHttpProgress {
//     //当前进度 文件大小 文件名/标记
//     void onProgress(long rwLen, long allLen, String mark);
// 
// }


import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import org.song.http.framework.ability.HttpCallback;
import org.song.http.framework.ability.HttpCallbackEx;
import org.song.http.framework.ability.IHttpProgress;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
        final int what = message.what;
        HttpCallback cb = sparseArray.get(what);
        if (cb == null) {
            sparseArray.remove(what);
            return;
        }
        switch (message.arg1) {
            case HttpEnum.HTTP_SUCCESS:
                sparseArray.remove(what);
                if (cb instanceof HttpCallbackEx && ((HttpCallbackEx) cb).isDestroy())
                    break;
                ResponseParams responseParams = (ResponseParams) message.obj;
                try {
                    cb.onSuccess(responseParams);
                } catch (Exception e) {
                    e.printStackTrace();
                    cb.onFailure(HttpException.Run(e).responseParams(responseParams));
                }
                if (cb instanceof HttpCallbackEx)
                    ((HttpCallbackEx) cb).onEnd();
                break;
            case HttpEnum.HTTP_FAILURE:
                sparseArray.remove(what);
                if (cb instanceof HttpCallbackEx && ((HttpCallbackEx) cb).isDestroy())
                    break;
                cb.onFailure((HttpException) message.obj);
                if (cb instanceof HttpCallbackEx)
                    ((HttpCallbackEx) cb).onEnd();
                break;
            case HttpEnum.HTTP_PROGRESS:
// Path: qshttp/src/main/java/org/song/http/framework/ability/HttpCallback.java
// public interface HttpCallback {
// 
//     void onSuccess(ResponseParams response);
// 
//     void onFailure(HttpException e);
// 
// }
// 
// Path: qshttp/src/main/java/org/song/http/framework/ability/HttpCallbackEx.java
// public interface HttpCallbackEx extends HttpCallback {
// 
//     void onStart();
// 
//     void onEnd();
// 
//     //返回true 则不会回调
//     boolean isDestroy();
// }
// 
// Path: qshttp/src/main/java/org/song/http/framework/ability/IHttpProgress.java
// public interface IHttpProgress {
//     //当前进度 文件大小 文件名/标记
//     void onProgress(long rwLen, long allLen, String mark);
// 
// }


// Path: qshttp/src/main/java/org/song/http/framework/ThreadHandler.java
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import org.song.http.framework.ability.HttpCallback;
import org.song.http.framework.ability.HttpCallbackEx;
import org.song.http.framework.ability.IHttpProgress;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

        final int what = message.what;
        HttpCallback cb = sparseArray.get(what);
        if (cb == null) {
            sparseArray.remove(what);
            return;
        }
        switch (message.arg1) {
            case HttpEnum.HTTP_SUCCESS:
                sparseArray.remove(what);
                if (cb instanceof HttpCallbackEx && ((HttpCallbackEx) cb).isDestroy())
                    break;
                ResponseParams responseParams = (ResponseParams) message.obj;
                try {
                    cb.onSuccess(responseParams);
                } catch (Exception e) {
                    e.printStackTrace();
                    cb.onFailure(HttpException.Run(e).responseParams(responseParams));
                }
                if (cb instanceof HttpCallbackEx)
                    ((HttpCallbackEx) cb).onEnd();
                break;
            case HttpEnum.HTTP_FAILURE:
                sparseArray.remove(what);
                if (cb instanceof HttpCallbackEx && ((HttpCallbackEx) cb).isDestroy())
                    break;
                cb.onFailure((HttpException) message.obj);
                if (cb instanceof HttpCallbackEx)
                    ((HttpCallbackEx) cb).onEnd();
                break;
            case HttpEnum.HTTP_PROGRESS:
                if (cb instanceof IHttpProgress) {