Class IdleConnectionHandler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<org.apache.http.HttpConnection,​IdleConnectionHandler.TimeValues> connectionToTimes
      Deprecated.
      Holds connections and the time they were added.
      private org.apache.commons.logging.Log log
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void add​(org.apache.http.HttpConnection connection, long validDuration, java.util.concurrent.TimeUnit unit)
      Deprecated.
      Registers the given connection with this handler.
      void closeExpiredConnections()
      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 removeAll()
      Deprecated.
      Removes all connections referenced by this handler.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        private final org.apache.commons.logging.Log log
        Deprecated.
      • connectionToTimes

        private final java.util.Map<org.apache.http.HttpConnection,​IdleConnectionHandler.TimeValues> connectionToTimes
        Deprecated.
        Holds connections and the time they were added.
    • Constructor Detail

      • IdleConnectionHandler

        public IdleConnectionHandler()
        Deprecated.
    • Method Detail

      • 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.