Index: src/main/java/org/apache/http/client/fluent/Executor.java =================================================================== --- src/main/java/org/apache/http/client/fluent/Executor.java (revision 1389965) +++ src/main/java/org/apache/http/client/fluent/Executor.java (working copy) @@ -58,6 +58,12 @@ import org.apache.http.impl.conn.PoolingClientConnectionManager; import org.apache.http.protocol.BasicHttpContext; +/** + * An Executor for fluent request + *

+ * A PoolingClientConnectionManager with maximum 100 connections per route and + * a total maximum of 200 connections is used. + */ public class Executor { final static PoolingClientConnectionManager CONNMGR; @@ -178,6 +184,14 @@ return this; } + /** + * Execute a request. Note that the Response must be handled, otherwise the + * connection used for the request might not be returned to the pool, and + * the pool will eventually have no more free connections. + * + * @return Response, which must be handled, to make sure the resources are + * cleaned up + */ public Response execute( final Request request) throws ClientProtocolException, IOException { this.localContext.setAttribute(ClientContext.CREDS_PROVIDER, this.credentialsProvider); Index: src/main/java/org/apache/http/client/fluent/Response.java =================================================================== --- src/main/java/org/apache/http/client/fluent/Response.java (revision 1389965) +++ src/main/java/org/apache/http/client/fluent/Response.java (working copy) @@ -68,10 +68,16 @@ } } + /** + * Discard the content, which also takes care of cleaning up resources + */ public void discardContent() { dispose(); } + /** + * Handle the response using the specified ResponseHandler + */ public T handleResponse( final ResponseHandler handler) throws ClientProtocolException, IOException { assertNotConsumed();