| java.lang.Object org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory
SSLProtocolSocketFactory | public class SSLProtocolSocketFactory implements SecureProtocolSocketFactory(Code) | | A SecureProtocolSocketFactory that uses JSSE to create sockets.
author: Michael Becke author: Mike Bowler since: 2.0 |
Method Summary | |
public Socket | createSocket(String host, int port, InetAddress clientHost, int clientPort) | public Socket | createSocket(String host, int port, InetAddress localAddress, int localPort, HttpConnectionParams params) Attempts to get a new socket connection to the given host within the given time limit.
This method employs several techniques to circumvent the limitations of older JREs that
do not support connect timeout. | public Socket | createSocket(String host, int port) | public Socket | createSocket(Socket socket, String host, int port, boolean autoClose) | public boolean | equals(Object obj) All instances of SSLProtocolSocketFactory are the same. | static SSLProtocolSocketFactory | getSocketFactory() Gets an singleton instance of the SSLProtocolSocketFactory. | public int | hashCode() All instances of SSLProtocolSocketFactory have the same hash code. |
SSLProtocolSocketFactory | public SSLProtocolSocketFactory()(Code) | | Constructor for SSLProtocolSocketFactory.
|
createSocket | public Socket createSocket(String host, int port, InetAddress localAddress, int localPort, HttpConnectionParams params) throws IOException, UnknownHostException, ConnectTimeoutException(Code) | | Attempts to get a new socket connection to the given host within the given time limit.
This method employs several techniques to circumvent the limitations of older JREs that
do not support connect timeout. When running in JRE 1.4 or above reflection is used to
call Socket#connect(SocketAddress endpoint, int timeout) method. When executing in older
JREs a controller thread is executed. The controller thread attempts to create a new socket
within the given limit of time. If socket constructor does not return until the timeout
expires, the controller terminates and throws an
ConnectTimeoutException
Parameters: host - the host name/IP Parameters: port - the port on the host Parameters: localAddress - the local host name/IP to bind the socket to Parameters: localPort - the port on the local machine Parameters: params - HttpConnectionParams Http connection parameters Socket a new socket throws: IOException - if an I/O error occurs while creating the socket throws: UnknownHostException - if the IP address of the host cannot bedetermined since: 3.0 |
equals | public boolean equals(Object obj)(Code) | | All instances of SSLProtocolSocketFactory are the same.
|
getSocketFactory | static SSLProtocolSocketFactory getSocketFactory()(Code) | | Gets an singleton instance of the SSLProtocolSocketFactory.
a SSLProtocolSocketFactory |
hashCode | public int hashCode()(Code) | | All instances of SSLProtocolSocketFactory have the same hash code.
|
|
|