// Path: library/src/main/java/com/siu/android/volleyball/request/LocalRequest.java
// public abstract class LocalRequest<T> extends BallRequest<T> {
// 
//     protected LocalRequest() {
//         super(-1, null, null);
//     }
// 
//     protected LocalRequest(SingleResponseListener<T> responseListener) {
//         super(-1, null, responseListener, null);
//     }
// 
//     @Override
//     public boolean shouldProcessLocal() {
//         return true;
//     }
// 
//     @Override
//     protected LocalRequestProcessor<T> createLocalRequestProcessor() {
//         return new LocalRequestProcessor<T>() {
//             @Override
//             public T getLocalResponse() {
//                 return performLocal();
//             }
// 
//             @Override
//             public void saveLocalResponse(T response) {
// 
//             }
//         };
//     }
// 
//     public abstract T performLocal();
// }
// 
// Path: library/src/main/java/com/siu/android/volleyball/response/ResponseListener.java
// public interface ResponseListener<T> {
// 
//     public void onIntermediateResponse(T response, BallResponse.ResponseSource responseSource);
// 
//     public void onFinalResponse(T response, BallResponse.ResponseSource responseSource);
// 
//     public void onFinalResponseIdenticalToIntermediate(BallResponse.ResponseSource responseSource);
// }
// 
// Path: library/src/main/java/com/siu/android/volleyball/response/SingleResponseListener.java
// public abstract class SingleResponseListener<T> implements ResponseListener<T> {
// 
//     /**
//      * Can happen when the response is soft cached
//      *
//      * @param response
//      * @param responseSource
//      */
//     @Override
//     public final void onIntermediateResponse(T response, BallResponse.ResponseSource responseSource) {
//         onResponse(response);
//     }
// 
//     @Override
//     public final void onFinalResponse(T response, BallResponse.ResponseSource responseSource) {
//         onResponse(response);
//     }
// 
//     /**
//      * Can happen when the response is soft cached. Maybe ?
//      *
//      * @param responseSource
//      */
//     @Override
//     public final void onFinalResponseIdenticalToIntermediate(BallResponse.ResponseSource responseSource) {
// 
//     }
// 
//     //TODO: add response source because it can still be soft cached response
//     public abstract void onResponse(T response);
// }
// 
// Path: samples/src/main/java/com/siu/android/volleyball/samples/util/ScenarioUtils.java
// public class ScenarioUtils {
// 
//     public static final void waitSeveralSeconds(int seconds) {
//         try {
//             Thread.sleep(seconds * 1000);
//         } catch (InterruptedException e) {
//             throw new RuntimeException(e);
//         }
//     }
// }


import com.android.volley.Response;
import com.siu.android.volleyball.request.LocalRequest;
import com.siu.android.volleyball.response.ResponseListener;
import com.siu.android.volleyball.response.SingleResponseListener;
import com.siu.android.volleyball.samples.util.ScenarioUtils;
package com.siu.android.volleyball.samples.volley.request;


/**
 * Sample local request
 * The request here returns a String object result of the async operation, but you can also use the Void type
 */
public class SampleLocalRequest extends LocalRequest<String> {

    public SampleLocalRequest(SingleResponseListener<String> responseListener) {
        super(responseListener);
    }

    @Override
    public String performLocal() {
        // perform your task outside of UI thread here
// Path: library/src/main/java/com/siu/android/volleyball/request/LocalRequest.java
// public abstract class LocalRequest<T> extends BallRequest<T> {
// 
//     protected LocalRequest() {
//         super(-1, null, null);
//     }
// 
//     protected LocalRequest(SingleResponseListener<T> responseListener) {
//         super(-1, null, responseListener, null);
//     }
// 
//     @Override
//     public boolean shouldProcessLocal() {
//         return true;
//     }
// 
//     @Override
//     protected LocalRequestProcessor<T> createLocalRequestProcessor() {
//         return new LocalRequestProcessor<T>() {
//             @Override
//             public T getLocalResponse() {
//                 return performLocal();
//             }
// 
//             @Override
//             public void saveLocalResponse(T response) {
// 
//             }
//         };
//     }
// 
//     public abstract T performLocal();
// }
// 
// Path: library/src/main/java/com/siu/android/volleyball/response/ResponseListener.java
// public interface ResponseListener<T> {
// 
//     public void onIntermediateResponse(T response, BallResponse.ResponseSource responseSource);
// 
//     public void onFinalResponse(T response, BallResponse.ResponseSource responseSource);
// 
//     public void onFinalResponseIdenticalToIntermediate(BallResponse.ResponseSource responseSource);
// }
// 
// Path: library/src/main/java/com/siu/android/volleyball/response/SingleResponseListener.java
// public abstract class SingleResponseListener<T> implements ResponseListener<T> {
// 
//     /**
//      * Can happen when the response is soft cached
//      *
//      * @param response
//      * @param responseSource
//      */
//     @Override
//     public final void onIntermediateResponse(T response, BallResponse.ResponseSource responseSource) {
//         onResponse(response);
//     }
// 
//     @Override
//     public final void onFinalResponse(T response, BallResponse.ResponseSource responseSource) {
//         onResponse(response);
//     }
// 
//     /**
//      * Can happen when the response is soft cached. Maybe ?
//      *
//      * @param responseSource
//      */
//     @Override
//     public final void onFinalResponseIdenticalToIntermediate(BallResponse.ResponseSource responseSource) {
// 
//     }
// 
//     //TODO: add response source because it can still be soft cached response
//     public abstract void onResponse(T response);
// }
// 
// Path: samples/src/main/java/com/siu/android/volleyball/samples/util/ScenarioUtils.java
// public class ScenarioUtils {
// 
//     public static final void waitSeveralSeconds(int seconds) {
//         try {
//             Thread.sleep(seconds * 1000);
//         } catch (InterruptedException e) {
//             throw new RuntimeException(e);
//         }
//     }
// }


// Path: samples/src/main/java/com/siu/android/volleyball/samples/volley/request/SampleLocalRequest.java
import com.android.volley.Response;
import com.siu.android.volleyball.request.LocalRequest;
import com.siu.android.volleyball.response.ResponseListener;
import com.siu.android.volleyball.response.SingleResponseListener;
import com.siu.android.volleyball.samples.util.ScenarioUtils;

package com.siu.android.volleyball.samples.volley.request;


/**
 * Sample local request
 * The request here returns a String object result of the async operation, but you can also use the Void type
 */
public class SampleLocalRequest extends LocalRequest<String> {

    public SampleLocalRequest(SingleResponseListener<String> responseListener) {
        super(responseListener);
    }

    @Override
    public String performLocal() {
        // perform your task outside of UI thread here
        ScenarioUtils.waitSeveralSeconds(2);