Home | History | Annotate | Download | only in utils
      1 // Copyright 2011 Google Inc. All rights reserved.
      2 
      3 package com.android.volley.utils;
      4 
      5 import com.android.volley.ExecutorDelivery;
      6 
      7 import java.util.concurrent.Executor;
      8 
      9 /**
     10  * A ResponseDelivery for testing that immediately delivers responses
     11  * instead of posting back to the main thread.
     12  */
     13 public class ImmediateResponseDelivery extends ExecutorDelivery {
     14 
     15     public ImmediateResponseDelivery() {
     16         super(new Executor() {
     17             @Override
     18             public void execute(Runnable command) {
     19                 command.run();
     20             }
     21         });
     22     }
     23 }
     24