限定符和类型 | 字段和说明 |
---|---|
protected Callback<Response> |
callback |
protected HttpURLConnection |
conn |
static int |
Default_Conn_Timeout
默认连接超时, 30秒
|
static int |
Default_Read_Timeout
默认读取超时, 10分钟
|
protected static ExecutorService |
es |
protected HttpReqRespInterceptor |
interceptor |
protected Request |
request |
限定符和类型 | 方法和说明 |
---|---|
Response |
call() |
static Sender |
create(Request request) |
static Sender |
create(Request request,
int timeout) |
static Sender |
create(String url) |
static Sender |
create(String url,
int timeout) |
protected Response |
createResponse(Map<String,String> reHeaders) |
static ExecutorService |
getExecutorService() |
protected Map<String,String> |
getResponseHeader() |
int |
getTimeout() |
protected void |
openConnection() |
abstract Response |
send() |
Future<Response> |
send(Callback<Response> callback) |
Sender |
setCallback(Callback<Response> callback) |
Sender |
setInterceptor(HttpReqRespInterceptor interceptor) |
Sender |
setTimeout(int timeout) |
static ExecutorService |
setup(ExecutorService es) |
protected void |
setupDoInputOutputFlag() |
protected void |
setupRequestHeader() |
static List<Runnable> |
shutdown() |
public static int Default_Conn_Timeout
public static int Default_Read_Timeout
protected Request request
protected HttpURLConnection conn
protected HttpReqRespInterceptor interceptor
protected static ExecutorService es
protected Sender(Request request)
public abstract Response send() throws HttpException
HttpException
protected Response createResponse(Map<String,String> reHeaders) throws IOException
IOException
protected Map<String,String> getResponseHeader() throws IOException
IOException
protected void setupDoInputOutputFlag()
protected void openConnection() throws IOException
IOException
protected void setupRequestHeader()
public Sender setTimeout(int timeout)
public int getTimeout()
public Sender setInterceptor(HttpReqRespInterceptor interceptor)
public Future<Response> send(Callback<Response> callback) throws HttpException
HttpException
public static ExecutorService setup(ExecutorService es)
public static ExecutorService getExecutorService()
Copyright © 2016. All rights reserved.