@Deprecated public class IdleConnectionHandler extends Object
此类不同步。
| Constructor and Description |
|---|
IdleConnectionHandler()
已过时。
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(HttpConnection connection, long validDuration, TimeUnit unit)
已过时。
注册与此处理程序的给定连接。
|
void |
closeExpiredConnections()
已过时。
|
void |
closeIdleConnections(long idleTime)
已过时。
关闭至少在给定时间内空闲的连接。
|
boolean |
remove(HttpConnection connection)
已过时。
从空闲列表中删除要关闭的连接列表中的给定连接。
|
void |
removeAll()
已过时。
删除此处理程序引用的所有连接。
|
public void add(HttpConnection connection, long validDuration, TimeUnit unit)
remove(org.apache.http.HttpConnection)或closeIdleConnections(long)被调用。
connection - 要添加的连接
remove(org.apache.http.HttpConnection)
public boolean remove(HttpConnection connection)
connection -
public void removeAll()
public void closeIdleConnections(long idleTime)
idleTime - 要关闭连接的最短空闲时间(以毫秒为单位)
public void closeExpiredConnections()
Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.