| java.lang.Object org.apache.commons.httpclient.protocol.ReflectionSocketFactory
ReflectionSocketFactory | final public class ReflectionSocketFactory (Code) | | This helper class uses refelction in order to execute Socket methods
available in Java 1.4 and above
author: Oleg Kalnichevski since: 3.0 |
Method Summary | |
public static Socket | createSocket(String socketfactoryName, String host, int port, InetAddress localAddress, int localPort, int timeout) This method attempts to execute Socket method available since Java 1.4
using reflection. |
createSocket | public static Socket createSocket(String socketfactoryName, String host, int port, InetAddress localAddress, int localPort, int timeout) throws IOException, UnknownHostException, ConnectTimeoutException(Code) | | This method attempts to execute Socket method available since Java 1.4
using reflection. If the methods are not available or could not be executed
null is returned
Parameters: socketfactoryName - name of the socket factory class 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: timeout - the timeout value to be used in milliseconds. If the socket cannot becompleted within the given time limit, it will be abandoned a connected Socket throws: IOException - if an I/O error occurs while creating the socket throws: UnknownHostException - if the IP address of the host cannot bedetermined throws: ConnectTimeoutException - if socket cannot be connected within thegiven time limit |
|
|