# Class HttpSSLProtocolSocketFactory

java.lang.Object
javax.net.SocketFactory
javax.net.ssl.SSLSocketFactory
org.apache.jmeter.util.HttpSSLProtocolSocketFactory

public class HttpSSLProtocolSocketFactory extends SSLSocketFactory
Derived from EasySSLProtocolFactory Used by JsseSSLManager to set up the Commons HttpClient and Java https socket handling

## Constructor Summary

Constructors
Constructor
Description
`HttpSSLProtocolSocketFactory(JsseSSLManager sslManager)`
`HttpSSLProtocolSocketFactory(JsseSSLManager sslManager, int cps)`

## Method Summary

Modifier and Type
Method
Description
`Socket`
`createSocket()`
`Socket`
`createSocket(String host, int port)`
`Socket`
`createSocket(String host, int port, InetAddress clientHost, int clientPort)`
`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.
`Socket`
`createSocket(InetAddress host, int port)`
`Socket`
`createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)`
`Socket`
`createSocket(Socket socket, String host, int port, boolean autoClose)`
`String[]`
`getDefaultCipherSuites()`
`String[]`
`getSupportedCipherSuites()`

### Methods inherited from class SSLSocketFactory

`createSocket, getDefault`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HttpSSLProtocolSocketFactory

public HttpSSLProtocolSocketFactory(JsseSSLManager sslManager)

### HttpSSLProtocolSocketFactory

public HttpSSLProtocolSocketFactory(JsseSSLManager sslManager, int cps)

## Method Details

### createSocket

public Socket createSocket(String host, int port, InetAddress localAddress, int localPort, HttpConnectionParams params) throws IOException, UnknownHostException, ConnectTimeoutException
Attempts to get a new socket connection to the given host within the given time limit.

Parameters:
  `host` - the host name/IP
  `port` - the port on the host
  `localAddress` - the local host name/IP to bind the socket to
  `localPort` - the port on the local machine
  `params` -
  invalid reference

      Http connection parameters

Returns:
  Socket a new socket
Throws:
  `IOException` - if an I/O error occurs while creating the socket
  `UnknownHostException` - if the IP address of the host cannot be determined
  `ConnectTimeoutException`

### createSocket

public Socket createSocket(String host, int port) throws IOException, UnknownHostException

Specified by:
  `createSocket` in class `SocketFactory`
Throws:
  `IOException`
  `UnknownHostException`
See Also:
  - invalid reference

        SecureProtocolSocketFactory#createSocket(java.lang.String,int)

### createSocket

public Socket createSocket() throws IOException, UnknownHostException

Overrides:
  `createSocket` in class `SocketFactory`
Throws:
  `IOException`
  `UnknownHostException`
See Also:
  - `SocketFactory.createSocket()`

### createSocket

public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException

Specified by:
  `createSocket` in class `SSLSocketFactory`
Throws:
  `IOException`
  `UnknownHostException`
See Also:
  - invalid reference

        SecureProtocolSocketFactory#createSocket(java.net.Socket,java.lang.String,int,boolean)

### createSocket

public Socket createSocket(String host, int port, InetAddress clientHost, int clientPort) throws IOException, UnknownHostException

Specified by:
  `createSocket` in class `SocketFactory`
Throws:
  `IOException`
  `UnknownHostException`
See Also:
  - invalid reference

        SecureProtocolSocketFactory#createSocket(java.lang.String,int,java.net.InetAddress,int)

### createSocket

public Socket createSocket(InetAddress host, int port) throws IOException

Specified by:
  `createSocket` in class `SocketFactory`
Throws:
  `IOException`

### createSocket

public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException

Specified by:
  `createSocket` in class `SocketFactory`
Throws:
  `IOException`

### getDefaultCipherSuites

public String[] getDefaultCipherSuites()

Specified by:
  `getDefaultCipherSuites` in class `SSLSocketFactory`

### getSupportedCipherSuites

public String[] getSupportedCipherSuites()

Specified by:
  `getSupportedCipherSuites` in class `SSLSocketFactory`