org.apache.commons.httpclient.util
Class IdleConnectionHandler
java.lang.Object
org.apache.commons.httpclient.util.IdleConnectionHandler
public class IdleConnectionHandler
extends java.lang.Object
A helper class for connection managers to track idle connections.
This class is not synchronized.
void | add(HttpConnection connection) - Registers the given connection with this handler.
|
void | closeIdleConnections(long idleTime) - Closes connections that have been idle for at least the given amount of time.
|
void | remove(HttpConnection connection) - Removes the given connection from the list of connections to be closed when idle.
|
void | removeAll() - Removes all connections referenced by this handler.
|
IdleConnectionHandler
public IdleConnectionHandler()
add
public void add(HttpConnection connection)
connection
- the connection to add
closeIdleConnections
public void closeIdleConnections(long idleTime)
Closes connections that have been idle for at least the given amount of time.
idleTime
- the minimum idle time, in milliseconds, for connections to be closed
remove
public void remove(HttpConnection connection)
Removes the given connection from the list of connections to be closed when idle.
removeAll
public void removeAll()
Removes all connections referenced by this handler.
Copyright (c) 1999-2005 - Apache Software Foundation