public abstract class NetworkRunnable
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
mCloseLock
The close lock.
|
protected java.net.HttpURLConnection |
mConnection
The connection.
|
protected com.google.common.util.concurrent.SettableFuture<Response> |
mFuture
The future.
|
protected Request |
mRequest
The request.
|
protected java.io.InputStream |
mResponseStream
The response stream.
|
| Constructor and Description |
|---|
NetworkRunnable(Request request,
com.google.common.util.concurrent.SettableFuture<Response> future)
Initializes the network runnable
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeStreamAndConnection()
Closes the stream and connection, if possible
|
protected java.net.HttpURLConnection mConnection
protected java.io.InputStream mResponseStream
protected Request mRequest
protected com.google.common.util.concurrent.SettableFuture<Response> mFuture
protected final java.lang.Object mCloseLock