public class PollingHttpClient extends Object
构造器和说明 |
---|
PollingHttpClient(String group)
构造实例
|
限定符和类型 | 方法和说明 |
---|---|
static PollingHttpClient |
build(String group) |
void |
cancelRequests(Object tag,
boolean mayInterruptIfRunning)
取消请求
|
void |
send(Object tag,
String url,
Map<String,String> params,
PollingResponseHandler responseHandler,
int retryTimes,
long sleeptimes)
发送轮询请求(get请求)
|
void |
send(Object tag,
String url,
RequestBody requestBody,
PollingResponseHandler responseHandler,
int retryTimes,
long sleeptimes) |
protected void |
sendRequest(OkHttpClient client,
Request uriRequest,
PollingResponseHandler responseHandler,
Object context,
int retryTimes,
long sleeptimes) |
void |
shutdown() |
public PollingHttpClient(String group)
public static PollingHttpClient build(String group)
public void send(Object tag, String url, Map<String,String> params, PollingResponseHandler responseHandler, int retryTimes, long sleeptimes)
tag
- url
- params
- responseHandler
- retryTimes
- sleeptimes
- public void send(Object tag, String url, RequestBody requestBody, PollingResponseHandler responseHandler, int retryTimes, long sleeptimes)
protected void sendRequest(OkHttpClient client, Request uriRequest, PollingResponseHandler responseHandler, Object context, int retryTimes, long sleeptimes)
public void cancelRequests(Object tag, boolean mayInterruptIfRunning)
tag
- mayInterruptIfRunning
- public void shutdown()