Class IdleConnectionHandler
java.lang.Object
org.apache.commons.httpclient.util.IdleConnectionHandler
Deprecated.
Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project.
It is not recommended to use it in any new code.
Instead, use HTTP client API plugins as a dependency in your code.
E.g.
Apache HttpComponents Client API 4.x Plugin or
Async HTTP Client Plugin.
A helper class for connection managers to track idle connections.
This class is not synchronized.
- Since:
- 3.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(HttpConnection connection) Deprecated.Registers the given connection with this handler.voidcloseIdleConnections(long idleTime) Deprecated.Closes connections that have been idle for at least the given amount of time.voidremove(HttpConnection connection) Deprecated.Removes the given connection from the list of connections to be closed when idle.voidDeprecated.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(HttpConnection)orcloseIdleConnections(long)is called.- Parameters:
connection- the connection to add- See Also:
-
remove
Deprecated.Removes the given connection from the list of connections to be closed when idle.- Parameters:
connection-
-
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
-