diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java b/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java index ada8d9513..34230a0ab 100644 --- a/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java +++ b/httpclient/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java @@ -85,6 +85,10 @@ public final class PlainSocketFactory implements SocketFactory, SchemeSocketFact } /** + * @param params Optional parameters. Parameters passed to this method will have no effect. + * This method will create a unconnected instance of {@link Socket} class + * using default constructor. + * * @since 4.1 */ public Socket createSocket(final HttpParams params) { diff --git a/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactory.java b/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactory.java index 7d5b82e1a..f5b5cf6f4 100644 --- a/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactory.java +++ b/httpclient/src/main/java/org/apache/http/conn/scheme/SchemeSocketFactory.java @@ -47,7 +47,14 @@ public interface SchemeSocketFactory { * Creates a new, unconnected socket. The socket should subsequently be passed to * {@link #connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)}. * - * @param params additional {@link HttpParams parameters} + * @param params Optional {@link HttpParams parameters}. In most cases these parameters + * will not be required and will have no effect, as usually socket + * initialization should take place in the + * {@link #connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)} + * method. However, in rare cases one may want to pass additional parameters + * to this method in order to create a customized {@link Socket} instance, + * for instance bound to a SOCKS proxy server. + * * @return a new socket * * @throws IOException if an I/O error occurs while creating the socket diff --git a/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java b/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java index 301cffba8..4875d3942 100644 --- a/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java +++ b/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java @@ -335,6 +335,9 @@ public class SSLSocketFactory implements LayeredSchemeSocketFactory, LayeredSock } /** + * @param params Optional parameters. Parameters passed to this method will have no effect. + * This method will create a unconnected instance of {@link Socket} class + * using {@link javax.net.ssl.SSLSocketFactory#createSocket()} method. * @since 4.1 */ @SuppressWarnings("cast")