aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/java/com/android/volley/RequestTask.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/com/android/volley/RequestTask.java')
-rw-r--r--core/src/main/java/com/android/volley/RequestTask.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/src/main/java/com/android/volley/RequestTask.java b/core/src/main/java/com/android/volley/RequestTask.java
new file mode 100644
index 0000000..b429f79
--- /dev/null
+++ b/core/src/main/java/com/android/volley/RequestTask.java
@@ -0,0 +1,20 @@
+package com.android.volley;
+
+/**
+ * Abstract runnable that's a task to be completed by the RequestQueue.
+ *
+ * <p><b>WARNING</b>: This API is experimental and subject to breaking changes. Please see
+ * https://github.com/google/volley/wiki/Asynchronous-Volley for more details.
+ */
+public abstract class RequestTask<T> implements Runnable {
+ final Request<T> mRequest;
+
+ public RequestTask(Request<T> request) {
+ mRequest = request;
+ }
+
+ @SuppressWarnings("unchecked")
+ public int compareTo(RequestTask<?> other) {
+ return mRequest.compareTo((Request<T>) other.mRequest);
+ }
+}