public class

NetworkDispatcher

extends Thread
java.lang.Object
   ↳ java.lang.Thread
     ↳ com.android.volley.NetworkDispatcher

Class Overview

Provides a thread for performing network dispatch from a queue of requests. Requests added to the specified queue are processed from the network via a specified Network interface. Responses are committed to cache, if eligible, using a specified Cache interface. Valid responses and errors are posted back to the caller via a ResponseDelivery.

Summary

[Expand]
Inherited Constants
From class java.lang.Thread
Public Constructors
NetworkDispatcher(BlockingQueue<Request<?>> queue, Network network, Cache cache, ResponseDelivery delivery)
Creates a new network dispatcher thread.
Public Methods
void quit()
Forces this dispatcher to quit immediately.
void run()
[Expand]
Inherited Methods
From class java.lang.Thread
From class java.lang.Object
From interface java.lang.Runnable

Public Constructors

public NetworkDispatcher (BlockingQueue<Request<?>> queue, Network network, Cache cache, ResponseDelivery delivery)

Creates a new network dispatcher thread. You must call start() in order to begin processing.

Parameters
queue Queue of incoming requests for triage
network Network interface to use for performing requests
cache Cache interface to use for writing responses to cache
delivery Delivery interface to use for posting responses

Public Methods

public void quit ()

Forces this dispatcher to quit immediately. If any requests are still in the queue, they are not guaranteed to be processed.

public void run ()