You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ro...@apache.org on 2007/01/21 09:12:58 UTC
svn commit: r498254 -
/jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/IdleConnectionHandler.java
Author: rolandw
Date: Sun Jan 21 00:12:57 2007
New Revision: 498254
URL: http://svn.apache.org/viewvc?view=rev&rev=498254
Log:
generalized connection interface
Modified:
jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/IdleConnectionHandler.java
Modified: jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/IdleConnectionHandler.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/IdleConnectionHandler.java?view=diff&rev=498254&r1=498253&r2=498254
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/IdleConnectionHandler.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/conn/impl/IdleConnectionHandler.java Sun Jan 21 00:12:57 2007
@@ -36,14 +36,15 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.http.conn.HttpHostConnection;
+import org.apache.http.HttpConnection;
+
/**
* A helper class for connection managers to track idle connections.
*
* <p>This class is not synchronized.</p>
*
- * @see org.apache.http.conn.HttpConnectionManager#closeIdleConnections(long)
+ * @see org.apache.http.conn.ClientConnectionManager#closeIdleConnections(long)
*
* @since 3.0
*/
@@ -69,7 +70,7 @@
*
* @see #remove
*/
- public void add(HttpHostConnection connection) {
+ public void add(HttpConnection connection) {
Long timeAdded = new Long(System.currentTimeMillis());
@@ -84,7 +85,7 @@
* Removes the given connection from the list of connections to be closed when idle.
* @param connection
*/
- public void remove(HttpHostConnection connection) {
+ public void remove(HttpConnection connection) {
connectionToAdded.remove(connection);
}
@@ -112,7 +113,7 @@
Iterator connectionIter = connectionToAdded.keySet().iterator();
while (connectionIter.hasNext()) {
- HttpHostConnection conn = (HttpHostConnection) connectionIter.next();
+ HttpConnection conn = (HttpConnection) connectionIter.next();
Long connectionTime = (Long) connectionToAdded.get(conn);
if (connectionTime.longValue() <= idleTimeout) {
if (LOG.isDebugEnabled()) {