public abstract class Sender extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected HttpURLConnection |
conn |
static int |
Default_Conn_Timeout
默认连接超时, 30秒
|
static int |
Default_Read_Timeout
默认读取超时, 10分钟
|
protected Request |
request |
protected int |
timeout |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
protected Map<String,String> |
getResponseHeader() |
int |
getTimeout() |
protected void |
openConnection() |
abstract Response |
send() |
Sender |
setTimeout(int timeout) |
protected void |
setupDoInputOutputFlag() |
protected void |
setupRequestHeader() |
public static int Default_Conn_Timeout
public static int Default_Read_Timeout
protected Request request
protected int timeout
protected HttpURLConnection conn
protected Sender(Request request)
public abstract Response send() throws HttpException
HttpExceptionprotected Response createResponse(Map<String,String> reHeaders) throws IOException
IOExceptionprotected Map<String,String> getResponseHeader() throws IOException
IOExceptionprotected void setupDoInputOutputFlag()
protected void openConnection()
throws IOException
IOExceptionprotected void setupRequestHeader()
public Sender setTimeout(int timeout)
public int getTimeout()
Copyright © 2014. All rights reserved.