Class IdleConnectionHandler
java.lang.Object
edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.util.IdleConnectionHandler
A helper class for connection managers to track idle connections.
This class is not synchronized.
- Since:
- 3.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(HttpConnection connection) Registers the given connection with this handler.void
closeIdleConnections
(long idleTime) Closes connections that have been idle for at least the given amount of time.void
remove
(HttpConnection connection) Removes the given connection from the list of connections to be closed when idle.void
Removes all connections referenced by this handler.
-
Constructor Details
-
IdleConnectionHandler
public IdleConnectionHandler()
-
-
Method Details
-
add
Registers the given connection with this handler. The connection will be held untilremove(HttpConnection)
orcloseIdleConnections(long)
is called.- Parameters:
connection
- the connection to add- See Also:
-
remove
Removes the given connection from the list of connections to be closed when idle.- Parameters:
connection
-
-
removeAll
public void removeAll()Removes all connections referenced by this handler. -
closeIdleConnections
public void closeIdleConnections(long idleTime) 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
-