// Path: http/src/main/java/com/mcxiaoke/next/http/callback/FileCallback.java
// public interface FileCallback extends HttpCallback<File> {
// }
// 
// Path: http/src/main/java/com/mcxiaoke/next/http/callback/GsonCallback.java
// public abstract class GsonCallback<T> implements HttpCallback<T> {
//     public final Type type;
//     public final Gson gson;
// 
//     public GsonCallback(final Class<T> clazz) {
//         this(clazz, null);
//     }
// 
//     public GsonCallback(final Class<T> clazz, final Gson gson) {
//         this.type = clazz;
//         this.gson = gson;
//     }
// 
//     public GsonCallback(final Type type) {
//         this(type, null);
//     }
// 
//     public GsonCallback(Type type, final Gson gson) {
//         this.type = type;
//         this.gson = gson;
//     }
// 
// }
// 
// Path: http/src/main/java/com/mcxiaoke/next/http/callback/ResponseCallback.java
// public interface ResponseCallback extends HttpCallback<NextResponse> {
// }
// 
// Path: http/src/main/java/com/mcxiaoke/next/http/callback/StringCallback.java
// public interface StringCallback extends HttpCallback<String> {
// }


import com.mcxiaoke.next.http.callback.FileCallback;
import com.mcxiaoke.next.http.callback.GsonCallback;
import com.mcxiaoke.next.http.callback.ResponseCallback;
import com.mcxiaoke.next.http.callback.StringCallback;
import java.io.File;
import java.util.Collections;
import java.util.Map;
package com.mcxiaoke.next.http;



/**
 * User: mcxiaoke
 * Date: 16/1/11
 * Time: 11:42
 */
public final class HttpAsync {

    private HttpAsync() {
        throw new RuntimeException("Can't create new instance");
    }

    private static HttpQueue sHttpQueue = null;

    public static void setHttpQueue(final HttpQueue httpQueue) {
        sHttpQueue = httpQueue;
    }

    private synchronized static HttpQueue getHttpQueue() {
        if (sHttpQueue == null) {
            sHttpQueue = HttpQueue.getDefault();
        }
        return sHttpQueue;
    }

    private static Map<String, String> emptyMap() {
        return Collections.emptyMap();
    }

// Path: http/src/main/java/com/mcxiaoke/next/http/callback/FileCallback.java
// public interface FileCallback extends HttpCallback<File> {
// }
// 
// Path: http/src/main/java/com/mcxiaoke/next/http/callback/GsonCallback.java
// public abstract class GsonCallback<T> implements HttpCallback<T> {
//     public final Type type;
//     public final Gson gson;
// 
//     public GsonCallback(final Class<T> clazz) {
//         this(clazz, null);
//     }
// 
//     public GsonCallback(final Class<T> clazz, final Gson gson) {
//         this.type = clazz;
//         this.gson = gson;
//     }
// 
//     public GsonCallback(final Type type) {
//         this(type, null);
//     }
// 
//     public GsonCallback(Type type, final Gson gson) {
//         this.type = type;
//         this.gson = gson;
//     }
// 
// }
// 
// Path: http/src/main/java/com/mcxiaoke/next/http/callback/ResponseCallback.java
// public interface ResponseCallback extends HttpCallback<NextResponse> {
// }
// 
// Path: http/src/main/java/com/mcxiaoke/next/http/callback/StringCallback.java
// public interface StringCallback extends HttpCallback<String> {
// }


// Path: http/src/main/java/com/mcxiaoke/next/http/HttpAsync.java
import com.mcxiaoke.next.http.callback.FileCallback;
import com.mcxiaoke.next.http.callback.GsonCallback;
import com.mcxiaoke.next.http.callback.ResponseCallback;
import com.mcxiaoke.next.http.callback.StringCallback;
import java.io.File;
import java.util.Collections;
import java.util.Map;

package com.mcxiaoke.next.http;



/**
 * User: mcxiaoke
 * Date: 16/1/11
 * Time: 11:42
 */
public final class HttpAsync {

    private HttpAsync() {
        throw new RuntimeException("Can't create new instance");
    }

    private static HttpQueue sHttpQueue = null;

    public static void setHttpQueue(final HttpQueue httpQueue) {
        sHttpQueue = httpQueue;
    }

    private synchronized static HttpQueue getHttpQueue() {
        if (sHttpQueue == null) {
            sHttpQueue = HttpQueue.getDefault();
        }
        return sHttpQueue;
    }

    private static Map<String, String> emptyMap() {
        return Collections.emptyMap();
    }

    public static String head(final String url, final ResponseCallback callback,