|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.conn.IdleConnectionHandler
@NotThreadSafe public class IdleConnectionHandler
A helper class for connection managers to track idle connections.
This class is not synchronized.
ClientConnectionManager.closeIdleConnections(long, java.util.concurrent.TimeUnit)
Constructor Summary | |
---|---|
IdleConnectionHandler()
|
Method Summary | |
---|---|
void |
add(HttpConnection connection,
long validDuration,
TimeUnit unit)
Registers the given connection with this handler. |
void |
closeExpiredConnections()
|
void |
closeIdleConnections(long idleTime)
Closes connections that have been idle for at least the given amount of time. |
boolean |
remove(HttpConnection connection)
Removes the given connection from the list of connections to be closed when idle. |
void |
removeAll()
Removes all connections referenced by this handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IdleConnectionHandler()
Method Detail |
---|
public void add(HttpConnection connection, long validDuration, TimeUnit unit)
remove(org.apache.http.HttpConnection)
or closeIdleConnections(long)
is called.
connection
- the connection to addremove(org.apache.http.HttpConnection)
public boolean remove(HttpConnection connection)
connection
-
public void removeAll()
public void closeIdleConnections(long idleTime)
idleTime
- the minimum idle time, in milliseconds, for connections to be closedpublic void closeExpiredConnections()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |