Package org.apache.http.impl.conn
Class IdleConnectionHandler
java.lang.Object
org.apache.http.impl.conn.IdleConnectionHandler
Deprecated.
(4.1) no longer used
A helper class for connection managers to track idle connections.
This class is not synchronized.
- Since:
- 4.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Registers the given connection with this handler.void
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
Deprecated.Removes all connections referenced by this handler.
-
Constructor Details
-
IdleConnectionHandler
public IdleConnectionHandler()Deprecated.
-
-
Method Details
-
add
Deprecated.Registers the given connection with this handler. The connection will be held untilremove(org.apache.http.HttpConnection)
orcloseIdleConnections(long)
is called.- Parameters:
connection
- the connection to add- See Also:
-
remove
public boolean remove(org.apache.http.HttpConnection connection) Deprecated.Removes the given connection from the list of connections to be closed when idle. This will return true if the connection is still valid, and false if the connection should be considered expired and not used.- Parameters:
connection
-- Returns:
- True if the connection is still valid.
-
removeAll
public void removeAll()Deprecated.Removes all connections referenced by this handler. -
closeIdleConnections
public void closeIdleConnections(long idleTime) Deprecated.Closes connections that have been idle for at least the given amount of time.- Parameters:
idleTime
- the minimum idle time, in milliseconds, for connections to be closed
-
closeExpiredConnections
public void closeExpiredConnections()Deprecated.
-