Class IdleConnectionHandler
- java.lang.Object
-
- org.apache.commons.httpclient.util.IdleConnectionHandler
-
@Deprecated public class IdleConnectionHandler extends java.lang.Object
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:
HttpConnectionManager.closeIdleConnections(long)
-
-
Constructor Summary
Constructors Constructor Description IdleConnectionHandler()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
add(HttpConnection connection)
Deprecated.Registers the given connection with this handler.void
closeIdleConnections(long idleTime)
Deprecated.Closes connections that have been idle for at least the given amount of time.void
remove(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.
-
-
-
Method Detail
-
add
public void add(HttpConnection connection)
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(HttpConnection)
-
remove
public void remove(HttpConnection connection)
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
-
-