public final class Dispatcher extends Object
Each dispatcher uses an ExecutorService to run calls internally. If you supply your
own executor, it should be able to run the configured maximum number
of calls concurrently.
| Constructor and Description |
|---|
Dispatcher() |
Dispatcher(ExecutorService executorService) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelAll() |
ExecutorService |
executorService() |
int |
getMaxRequests() |
int |
getMaxRequestsPerHost() |
List<Call> |
queuedCalls() |
int |
queuedCallsCount() |
List<Call> |
runningCalls() |
int |
runningCallsCount() |
void |
setIdleCallback(Runnable idleCallback) |
void |
setMaxRequests(int maxRequests) |
void |
setMaxRequestsPerHost(int maxRequestsPerHost) |
public Dispatcher(ExecutorService executorService)
public Dispatcher()
public ExecutorService executorService()
public int getMaxRequests()
public void setMaxRequests(int maxRequests)
public int getMaxRequestsPerHost()
public void setMaxRequestsPerHost(int maxRequestsPerHost)
public void setIdleCallback(Runnable idleCallback)
public void cancelAll()
public int queuedCallsCount()
public int runningCallsCount()
Copyright © 2019. All rights reserved.