com.android.volley.toolbox
Class BasicNetwork
java.lang.Object
com.android.volley.toolbox.BasicNetwork
- All Implemented Interfaces:
- Network
public class BasicNetwork
- extends Object
- implements Network
A network performing Volley requests over an HttpStack
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
protected static final boolean DEBUG
mHttpStack
protected final HttpStack mHttpStack
mPool
protected final ByteArrayPool mPool
BasicNetwork
public BasicNetwork(HttpStack httpStack)
- Parameters:
httpStack
- HTTP stack to be used
BasicNetwork
public BasicNetwork(HttpStack httpStack,
ByteArrayPool pool)
- Parameters:
httpStack
- HTTP stack to be usedpool
- a buffer pool that improves GC performance in copy operations
performRequest
public NetworkResponse performRequest(Request<?> request)
throws VolleyError
- Description copied from interface:
Network
- Performs the specified request.
- Specified by:
performRequest
in interface Network
- Parameters:
request
- Request to process
- Returns:
- A
NetworkResponse
with data and caching metadata; will never be null
- Throws:
VolleyError
- on errors
logError
protected void logError(String what,
String url,
long start)