@Deprecated
public class IdleConnectionHandler
extends java.lang.Object
This class is not synchronized.
ClientConnectionManager.closeIdleConnections(long, java.util.concurrent.TimeUnit)
Modifier and Type | Class and Description |
---|---|
private static class |
IdleConnectionHandler.TimeValues
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<org.apache.http.HttpConnection,IdleConnectionHandler.TimeValues> |
connectionToTimes
Deprecated.
Holds connections and the time they were added.
|
private org.apache.commons.logging.Log |
log
Deprecated.
|
Constructor and Description |
---|
IdleConnectionHandler()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
add(org.apache.http.HttpConnection connection,
long validDuration,
java.util.concurrent.TimeUnit unit)
Deprecated.
Registers the given connection with this handler.
|
void |
closeExpiredConnections()
Deprecated.
|
void |
closeIdleConnections(long idleTime)
Deprecated.
Closes connections that have been idle for at least the given amount of time.
|
boolean |
remove(org.apache.http.HttpConnection connection)
Deprecated.
Removes the given connection from the list of connections to be closed when idle.
|
void |
removeAll()
Deprecated.
Removes all connections referenced by this handler.
|
private final org.apache.commons.logging.Log log
private final java.util.Map<org.apache.http.HttpConnection,IdleConnectionHandler.TimeValues> connectionToTimes
public void add(org.apache.http.HttpConnection connection, long validDuration, java.util.concurrent.TimeUnit unit)
remove(org.apache.http.HttpConnection)
or closeIdleConnections(long)
is called.connection
- the connection to addremove(org.apache.http.HttpConnection)
public boolean remove(org.apache.http.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()