Class IdleConnectionHandler

java.lang.Object
org.apache.commons.httpclient.util.IdleConnectionHandler

@Deprecated public class IdleConnectionHandler extends 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:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    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
    Deprecated.
    Removes all connections referenced by this handler.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IdleConnectionHandler

      public IdleConnectionHandler()
      Deprecated.
  • Method Details

    • add

      public void add(HttpConnection connection)
      Deprecated.
      Registers the given connection with this handler. The connection will be held until remove(HttpConnection) or closeIdleConnections(long) is called.
      Parameters:
      connection - the connection to add
      See Also:
    • 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