public class HttpConnectionPool extends PoolBase<HttpURLConnection> implements ConnectionPool<HttpURLConnection>
HttpConnectionPool
Http连接池
PoolBase,
ConnectionPool,
序列化表格| 限定符和类型 | 字段和说明 |
|---|---|
private static long |
serialVersionUID |
internalPool| 构造器和说明 |
|---|
HttpConnectionPool()
Instantiates a new Http connection pool.
|
HttpConnectionPool(PoolConfig poolConfig,
Properties properties)
Instantiates a new Http connection pool.
|
HttpConnectionPool(PoolConfig poolConfig,
Proxy proxy,
String url)
Instantiates a new Http connection pool.
|
HttpConnectionPool(PoolConfig poolConfig,
Proxy proxy,
String url,
String method)
Instantiates a new Http connection pool.
|
HttpConnectionPool(PoolConfig poolConfig,
Proxy proxy,
String url,
String method,
int connectTimeout,
int readTimeout)
Instantiates a new Http connection pool.
|
HttpConnectionPool(PoolConfig poolConfig,
Proxy proxy,
String url,
String method,
int connectTimeout,
int readTimeout,
Map<String,String> header)
Instantiates a new Http connection pool.
|
HttpConnectionPool(PoolConfig poolConfig,
String url)
Instantiates a new Http connection pool.
|
HttpConnectionPool(PoolConfig poolConfig,
String url,
String method)
Instantiates a new Http connection pool.
|
HttpConnectionPool(PoolConfig poolConfig,
String url,
String method,
int connectTimeout,
int readTimeout)
Instantiates a new Http connection pool.
|
HttpConnectionPool(PoolConfig poolConfig,
String url,
String method,
int connectTimeout,
int readTimeout,
Map<String,String> header)
Instantiates a new Http connection pool.
|
HttpConnectionPool(Proxy proxy,
String url)
Instantiates a new Http connection pool.
|
HttpConnectionPool(Proxy proxy,
String url,
String method)
Instantiates a new Http connection pool.
|
HttpConnectionPool(String url)
Instantiates a new Http connection pool.
|
HttpConnectionPool(String url,
String method)
Instantiates a new Http connection pool.
|
| 限定符和类型 | 方法和说明 |
|---|---|
HttpURLConnection |
getConnection()
Title: getConnection
Description: 获取连接
|
void |
invalidateConnection(HttpURLConnection conn)
Title: invalidateConnection
Description: 废弃连接
|
void |
returnConnection(HttpURLConnection conn)
Title: returnConnection
Description: 返回连接
|
addObjects, clear, close, destroy, getMaxBorrowWaitTimeMillis, getMeanBorrowWaitTimeMillis, getNumActive, getNumIdle, getNumWaiters, getResource, initPool, invalidateResource, isClosed, returnResourceprivate static final long serialVersionUID
public HttpConnectionPool()
public HttpConnectionPool(String url)
url - the urlpublic HttpConnectionPool(PoolConfig poolConfig, String url)
poolConfig - the pool configurl - the urlpublic HttpConnectionPool(PoolConfig poolConfig, Proxy proxy, String url)
poolConfig - the pool configproxy - the proxyurl - the urlpublic HttpConnectionPool(Proxy proxy, String url)
proxy - the proxyurl - the urlpublic HttpConnectionPool(String url, String method)
url - the urlmethod - the methodpublic HttpConnectionPool(Proxy proxy, String url, String method)
proxy - the proxyurl - the urlmethod - the methodpublic HttpConnectionPool(PoolConfig poolConfig, String url, String method)
poolConfig - the pool configurl - the urlmethod - the methodpublic HttpConnectionPool(PoolConfig poolConfig, Proxy proxy, String url, String method)
poolConfig - the pool configproxy - the proxyurl - the urlmethod - the methodpublic HttpConnectionPool(PoolConfig poolConfig, String url, String method, int connectTimeout, int readTimeout)
poolConfig - the pool configurl - the urlmethod - the methodconnectTimeout - the connect timeoutreadTimeout - the read timeoutpublic HttpConnectionPool(PoolConfig poolConfig, Proxy proxy, String url, String method, int connectTimeout, int readTimeout)
poolConfig - the pool configproxy - the proxyurl - the urlmethod - the methodconnectTimeout - the connect timeoutreadTimeout - the read timeoutpublic HttpConnectionPool(PoolConfig poolConfig, String url, String method, int connectTimeout, int readTimeout, Map<String,String> header)
poolConfig - the pool configurl - the urlmethod - the methodconnectTimeout - the connect timeoutreadTimeout - the read timeoutheader - the headerpublic HttpConnectionPool(PoolConfig poolConfig, Properties properties)
poolConfig - the pool configproperties - the propertiespublic HttpConnectionPool(PoolConfig poolConfig, Proxy proxy, String url, String method, int connectTimeout, int readTimeout, Map<String,String> header)
poolConfig - the pool configproxy - the proxyurl - the urlmethod - the methodconnectTimeout - the connect timeoutreadTimeout - the read timeoutheader - the headerpublic HttpURLConnection getConnection()
ConnectionPoolTitle: getConnection
Description: 获取连接
getConnection 在接口中 ConnectionPool<HttpURLConnection>public void returnConnection(HttpURLConnection conn)
ConnectionPoolTitle: returnConnection
Description: 返回连接
returnConnection 在接口中 ConnectionPool<HttpURLConnection>conn - 连接public void invalidateConnection(HttpURLConnection conn)
ConnectionPoolTitle: invalidateConnection
Description: 废弃连接
invalidateConnection 在接口中 ConnectionPool<HttpURLConnection>conn - 连接Copyright © 2015-2018 Dark Phoenixs. All Rights Reserved.