类 | |
| class | RedirectionResponseHandler |
| class | ResponderHandler |
Public 成员函数 | |
| AbHttpClient (Context context) | |
| void | get (final String url, final AbRequestParams params, final AbHttpResponseListener responseListener) |
| void | post (final String url, final AbRequestParams params, final AbHttpResponseListener responseListener) |
| void | writeResponseData (Context context, HttpEntity entity, String name, AbFileHttpResponseListener responseListener) |
| void | readResponseData (HttpEntity entity, AbBinaryHttpResponseListener responseListener) |
| void | setTimeout (int timeout) |
| BasicHttpParams | getHttpParams () |
| HttpClient | getHttpClient () |
| HttpClient | createHttpClient () |
| boolean | isOpenEasySSL () |
| void | setOpenEasySSL (boolean isOpenEasySSL) |
| String | getUserAgent () |
| void | setUserAgent (String userAgent) |
| String | getEncode () |
| void | setEncode (String encode) |
| void | shutdown () |
静态 Public 属性 | |
| static Executor | mExecutorService = null |
| static final int | DEFAULT_SOCKET_TIMEOUT = 10000 |
静态 Protected 属性 | |
| static final int | SUCCESS_MESSAGE = 0 |
| static final int | FAILURE_MESSAGE = 1 |
| static final int | FAILURE_MESSAGE_CONNECT = 2 |
| static final int | FAILURE_MESSAGE_SERVICE = 3 |
| static final int | START_MESSAGE = 4 |
| static final int | FINISH_MESSAGE = 5 |
| static final int | PROGRESS_MESSAGE = 6 |
| static final int | RETRY_MESSAGE = 7 |
Private 成员函数 | |
| void | doGet (String url, AbRequestParams params, AbHttpResponseListener responseListener) |
| void | doPost (String url, AbRequestParams params, AbHttpResponseListener responseListener) |
Private 属性 | |
| String | encode = HTTP.UTF_8 |
| String | userAgent = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 BIDUBrowser/6.x Safari/537.31" |
| int | mTimeout = DEFAULT_SOCKET_TIMEOUT |
| boolean | mIsOpenEasySSL = true |
| DefaultHttpClient | mHttpClient = null |
| HttpContext | mHttpContext = null |
| HttpRequestRetryHandler | mRequestRetryHandler |
静态 Private 属性 | |
| static Context | mContext |
| static final String | HTTP_GET = "GET" |
| static final String | HTTP_POST = "POST" |
| static final String | USER_AGENT = "User-Agent" |
| static final String | ACCEPT_ENCODING = "Accept-Encoding" |
| static final int | DEFAULT_MAX_CONNECTIONS = 10 |
| static final int | DEFAULT_MAX_RETRIES = 3 |
| static final int | DEFAULT_SOCKET_BUFFER_SIZE = 8192 |
| static final int | BUFFER_SIZE = 4096 |
© 2012 amsoft.cn 名称:AbHttpClient.java 描述:Http客户端
|
inline |
初始化.
| context | the context |
|
inline |
获取HttpClient,自签名的证书,如果想做签名参考AuthSSLProtocolSocketFactory类
| httpParams |
|
inlineprivate |
描述:执行get请求.
| url | the url |
| params | the params |
| responseListener | the response listener |
|
inlineprivate |
描述:执行post请求.
| url | the url |
| params | the params |
| responseListener | the response listener |
|
inline |
描述:带参数的get请求.
| url | the url |
| params | the params |
| responseListener | the response listener |
|
inline |
获取编码
|
inline |
获取HttpClient,自签名的证书,如果想做签名参考AuthSSLProtocolSocketFactory类
|
inline |
HTTP参数配置
|
inline |
获取用户代理
|
inline |
是否打开ssl 自签名
|
inline |
描述:带参数的post请求.
| url | the url |
| params | the params |
| responseListener | the response listener |
|
inline |
描述:转换为二进制并回调进度.
| entity | the entity |
| responseListener | the response listener |
|
inline |
设置编码
| encode |
|
inline |
打开ssl 自签名
| isOpenEasySSL |
|
inline |
描述:设置连接超时时间.
| timeout | 毫秒 |
|
inline |
设置用户代理
| userAgent |
|
inline |
关闭HttpClient
|
inline |
描述:写入文件并回调进度.
| context | the context |
| entity | the entity |
| name | the name |
| responseListener | the response listener |
|
staticprivate |
|
staticprivate |
缓冲大小.
|
staticprivate |
最大连接数.
|
staticprivate |
重试次数.
|
staticprivate |
缓冲大小.
|
static |
超时时间.
|
private |
编码.
|
staticprotected |
失败.
|
staticprotected |
和网络相关的失败.
|
staticprotected |
和服务相关的失败.
|
staticprotected |
完成.
|
staticprivate |
|
staticprivate |
|
staticprivate |
上下文.
|
static |
线程执行器.
|
private |
HTTP Client
|
private |
HTTP 上下文
|
private |
通用证书. 如果要求HTTPS连接,则使用SSL打开连接
|
private |
自动重试处理
|
private |
超时时间.
|
staticprotected |
进行中.
|
staticprotected |
重试.
|
staticprotected |
开始.
|
staticprotected |
成功.
|
staticprivate |
|
private |
用户代理.
1.8.8