| java.lang.Object net.matuschek.http.connection.HttpConnectionPool
HttpConnectionPool | abstract public class HttpConnectionPool (Code) | | This class implements an connection pool for HTTP TCP connections.
Actually, it doesn't pool, but this will be implemented in the next
time.
author: Daniel Matuschek version: $Id: HttpConnectionPool.java,v 1.4 2001/04/20 16:12:42 matuschd Exp $ |
connectionTimeout | int connectionTimeout(Code) | | TCP socket timeout (for connect and read/write)
|
HttpConnectionPool | public HttpConnectionPool(int maxConnections)(Code) | | Creates a new HTTP connection pool
Parameters: maxConnections - maximal number of open connections |
getConnection | abstract public HttpConnection getConnection(InetAddress addr, int port) throws IOException(Code) | | Gets a connection to the given server and port. Opens a new
connection or uses a connection from the pool if there is one
for this address/port combination
Parameters: address - the IP address to connect to Parameters: port - the port to connect to (usually 80 for HTTP) a HttpConnection object exception: IOException - if the TCP socket connection couldnot be established or all slots are used |
getConnectionTimeout | public int getConnectionTimeout()(Code) | | Gets the timeout for the HTTP connections
timeout in milliseconds |
giveback | abstract public void giveback(HttpConnection conn)(Code) | | Gives back the given HttpConnection to the pool
|
setConnectionTimeout | public void setConnectionTimeout(int connectionTimeout)(Code) | | Sets the timeout for the HTTP connections
Parameters: connectionTimeout - timeout in milliseconds |
|
|