com.android.volley.toolbox
Class BasicNetwork

java.lang.Object
  extended by com.android.volley.toolbox.BasicNetwork
All Implemented Interfaces:
Network

public class BasicNetwork
extends Object
implements Network

A network performing Volley requests over an HttpStack.


Field Summary
protected static boolean DEBUG
           
protected  HttpStack mHttpStack
           
protected  ByteArrayPool mPool
           
 
Constructor Summary
BasicNetwork(HttpStack httpStack)
           
BasicNetwork(HttpStack httpStack, ByteArrayPool pool)
           
 
Method Summary
protected  void logError(String what, String url, long start)
           
 NetworkResponse performRequest(Request<?> request)
          Performs the specified request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

protected static final boolean DEBUG

mHttpStack

protected final HttpStack mHttpStack

mPool

protected final ByteArrayPool mPool
Constructor Detail

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 used
pool - a buffer pool that improves GC performance in copy operations
Method Detail

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)