Package ch.qos.logback.core.net.ssl

# Class ConfigurableSSLSocketFactory

java.lang.Object
javax.net.SocketFactory
ch.qos.logback.core.net.ssl.ConfigurableSSLSocketFactory

public class ConfigurableSSLSocketFactory extends SocketFactory
An `SSLSocketFactory` that configures SSL parameters (those covered by `SSLParameters`) on each newly created socket.

When any of this factory's `createSocket` methods are invoked, it calls on a `SSLSocketFactory` delegate to create the socket, and then sets the SSL parameters of the socket (using the provided configuration) before returning the socket to the caller.

Author:
  Carl Harris

## Constructor Summary

Constructors
Constructor
Description
`ConfigurableSSLSocketFactory(SSLParametersConfiguration parameters, SSLSocketFactory delegate)`
Creates a new factory.

## Method Summary

Modifier and Type
Method
Description
`Socket`
`createSocket(String host, int port)`
`Socket`
`createSocket(String host, int port, InetAddress localHost, int localPort)`
`Socket`
`createSocket(InetAddress host, int port)`
`Socket`
`createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)`

### Methods inherited from class javax.net.SocketFactory

`createSocket, getDefault`

### Methods inherited from class java.lang.Object

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

## Constructor Details

### ConfigurableSSLSocketFactory

public ConfigurableSSLSocketFactory(SSLParametersConfiguration parameters, SSLSocketFactory delegate)
Creates a new factory.

Parameters:
  `parameters` - parameters that will be configured on each socket created by the factory
  `delegate` - socket factory that will be called upon to create sockets before configuration

## Method Details

### createSocket

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

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

### createSocket

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

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

### createSocket

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

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

### createSocket

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

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