限定符和类型 | 字段和说明 |
---|---|
protected Callback<Response> |
callback |
protected HttpURLConnection |
conn |
static int |
Default_Conn_Timeout
默认连接超时, 30秒
|
static int |
Default_Read_Timeout
默认读取超时, 10分钟
|
protected static ExecutorService |
es |
protected boolean |
followRedirects |
protected HttpReqRespInterceptor |
interceptor |
protected Callback<Integer> |
progressListener |
protected Request |
request |
protected SSLSocketFactory |
sslSocketFactory |
public static int Default_Conn_Timeout
public static int Default_Read_Timeout
protected Request request
protected HttpURLConnection conn
protected HttpReqRespInterceptor interceptor
protected boolean followRedirects
protected SSLSocketFactory sslSocketFactory
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()
public Sender setFollowRedirects(boolean followRedirects)
protected OutputStream getOutputStream() throws IOException
IOException
public int getEstimationSize() throws IOException
IOException
public void setSSLSocketFactory(SSLSocketFactory sslSocketFactory)
Copyright © 2017. All rights reserved.