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 javax.net.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 and Description
`ConfigurableSSLSocketFactory(SSLParametersConfiguration parameters, javax.net.ssl.SSLSocketFactory delegate)` Creates a new factory.

### Method Summary

Methods
`java.net.Socket` `createSocket(java.net.InetAddress host, int port)`
`java.net.Socket` `createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort)`
`java.net.Socket` `createSocket(java.lang.String host, int port)`
`java.net.Socket` `createSocket(java.lang.String host, int port, java.net.InetAddress localHost, 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 Detail

#### ConfigurableSSLSocketFactory

    public ConfigurableSSLSocketFactory(SSLParametersConfiguration parameters,
                                javax.net.ssl.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 Detail

#### createSocket

    public java.net.Socket createSocket(java.net.InetAddress address,
                               int port,
                               java.net.InetAddress localAddress,
                               int localPort)
                                 throws java.io.IOException

Specified by:
  `createSocket` in class `javax.net.SocketFactory`
Throws:
  `java.io.IOException`

#### createSocket

    public java.net.Socket createSocket(java.net.InetAddress host,
                               int port)
                                 throws java.io.IOException

Specified by:
  `createSocket` in class `javax.net.SocketFactory`
Throws:
  `java.io.IOException`

#### createSocket

    public java.net.Socket createSocket(java.lang.String host,
                               int port,
                               java.net.InetAddress localHost,
                               int localPort)
                                 throws java.io.IOException,
                                        java.net.UnknownHostException

Specified by:
  `createSocket` in class `javax.net.SocketFactory`
Throws:
  `java.io.IOException`
  `java.net.UnknownHostException`

#### createSocket

    public java.net.Socket createSocket(java.lang.String host,
                               int port)
                                 throws java.io.IOException,
                                        java.net.UnknownHostException

Specified by:
  `createSocket` in class `javax.net.SocketFactory`
Throws:
  `java.io.IOException`
  `java.net.UnknownHostException`