// Path: restvolley/src/main/java/com/hujiang/restvolley/webapi/RestVolleyCallback.java
// public abstract class RestVolleyCallback<T> {
// 
//     protected Exception mException;
// 
//     public void setException(Exception e) {
//         mException = e;
//     }
// 
//     public Exception getException() {
//         return mException;
//     }
// 
//     /**
//      * start request callback.
//      * @param request {@link RestVolleyRequest}
//      */
//     public void onStart(RestVolleyRequest request) {
// 
//     }
// 
//     /**
//      * finish request callback.
//      * @param request {@link RestVolleyRequest}
//      */
//     public void onFinished(RestVolleyRequest request) {
// 
//     }
// 
//     /**
//      * request success callback.
//      * @param statusCode http status code.
//      * @param data response data.
//      * @param headers response headers.
//      * @param notModified data not modified.
//      * @param networkTimeMs request times.
//      * @param message request message.
//      */
//     public abstract void onSuccess(int statusCode, T data, Map<String, String> headers, boolean notModified, long networkTimeMs, String message);
// 
//     /**
//      * request fail callback.
//      * @param statusCode http status code.
//      * @param data response data.
//      * @param headers response headers.
//      * @param notModified data not modified.
//      * @param networkTimeMs request times.
//      * @param message request message.
//      */
//     public abstract void onFail(int statusCode, T data, Map<String, String> headers, boolean notModified, long networkTimeMs, String message);
// }
// 
// Path: restvolley/src/main/java/com/hujiang/restvolley/webapi/request/GetRequest.java
// public class GetRequest extends RestVolleyRequestWithNoBody<GetRequest> {
//     /**
//      * constructor.
//      * @param context {@link Context}
//      */
//     public GetRequest(Context context) {
//         super(context, Request.Method.GET);
//     }
// }


import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.volley.DefaultRetryPolicy;
import com.hujiang.restvolley.webapi.RestVolleyCallback;
import com.hujiang.restvolley.webapi.request.GetRequest;
import java.util.Map;
package com.hujiang.restvolley.demo;




public class RestfulAPIActivity extends AppCompatActivity {

    private static final String TAG = RestfulAPIActivity.class.getSimpleName();

    private static final String[] CONCURRENCE_URLS = {
            "https://www.google.co.in/"
            , "http://www.baidu.com"
            , "http://stackoverflow.com/"
            , "http://www.hujiang.com"
            , "https://bintray.com/"
            , "http://www.infoq.com/cn/"
    };

    private LinearLayout mRestGroup;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_restful_api);

        mRestGroup = (LinearLayout) findViewById(R.id.rest_group);

        findViewById(R.id.btn_restful_api).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                for (final String s : CONCURRENCE_URLS) {
// Path: restvolley/src/main/java/com/hujiang/restvolley/webapi/RestVolleyCallback.java
// public abstract class RestVolleyCallback<T> {
// 
//     protected Exception mException;
// 
//     public void setException(Exception e) {
//         mException = e;
//     }
// 
//     public Exception getException() {
//         return mException;
//     }
// 
//     /**
//      * start request callback.
//      * @param request {@link RestVolleyRequest}
//      */
//     public void onStart(RestVolleyRequest request) {
// 
//     }
// 
//     /**
//      * finish request callback.
//      * @param request {@link RestVolleyRequest}
//      */
//     public void onFinished(RestVolleyRequest request) {
// 
//     }
// 
//     /**
//      * request success callback.
//      * @param statusCode http status code.
//      * @param data response data.
//      * @param headers response headers.
//      * @param notModified data not modified.
//      * @param networkTimeMs request times.
//      * @param message request message.
//      */
//     public abstract void onSuccess(int statusCode, T data, Map<String, String> headers, boolean notModified, long networkTimeMs, String message);
// 
//     /**
//      * request fail callback.
//      * @param statusCode http status code.
//      * @param data response data.
//      * @param headers response headers.
//      * @param notModified data not modified.
//      * @param networkTimeMs request times.
//      * @param message request message.
//      */
//     public abstract void onFail(int statusCode, T data, Map<String, String> headers, boolean notModified, long networkTimeMs, String message);
// }
// 
// Path: restvolley/src/main/java/com/hujiang/restvolley/webapi/request/GetRequest.java
// public class GetRequest extends RestVolleyRequestWithNoBody<GetRequest> {
//     /**
//      * constructor.
//      * @param context {@link Context}
//      */
//     public GetRequest(Context context) {
//         super(context, Request.Method.GET);
//     }
// }


// Path: app/src/main/java/com/hujiang/restvolley/demo/RestfulAPIActivity.java
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.volley.DefaultRetryPolicy;
import com.hujiang.restvolley.webapi.RestVolleyCallback;
import com.hujiang.restvolley.webapi.request.GetRequest;
import java.util.Map;

package com.hujiang.restvolley.demo;




public class RestfulAPIActivity extends AppCompatActivity {

    private static final String TAG = RestfulAPIActivity.class.getSimpleName();

    private static final String[] CONCURRENCE_URLS = {
            "https://www.google.co.in/"
            , "http://www.baidu.com"
            , "http://stackoverflow.com/"
            , "http://www.hujiang.com"
            , "https://bintray.com/"
            , "http://www.infoq.com/cn/"
    };

    private LinearLayout mRestGroup;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_restful_api);

        mRestGroup = (LinearLayout) findViewById(R.id.rest_group);

        findViewById(R.id.btn_restful_api).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                for (final String s : CONCURRENCE_URLS) {
                    new GetRequest(RestfulAPIActivity.this)