SocketFactories.TdsTlsSocketFactory (jTDS API)
Date: 2013-06-08

net.sourceforge.jtds.ssl

## Class SocketFactories.TdsTlsSocketFactory

- java.lang.Object
- - javax.net.SocketFactory
  - - net.sourceforge.jtds.ssl.SocketFactories.TdsTlsSocketFactory

- Enclosing class:
    SocketFactories

      private static class SocketFactories.TdsTlsSocketFactory
      extends javax.net.SocketFactory

  The socket factory for creating sockets based on the SSL setting.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static javax.net.ssl.SSLSocketFactory` | `factorySingleton`
    `private java.net.Socket` | `socket`
    `private java.lang.String` | `ssl`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SocketFactories.TdsTlsSocketFactory(java.lang.String ssl, java.net.Socket socket)` Constructs a TdsTlsSocketFactory.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.net.Socket` | `createSocket(java.net.InetAddress host, int port)`
    `java.net.Socket` | `createSocket(java.net.InetAddress host, int port, java.net.InetAddress localHost, int localPort)`
    `java.net.Socket` | `createSocket(java.lang.String host, int port)` Create the SSL socket.
    `java.net.Socket` | `createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort)`
    `private static javax.net.ssl.SSLSocketFactory` | `factory()` Returns an SSLSocketFactory whose sockets will not authenticate the server.
    `private javax.net.ssl.SSLSocketFactory` | `getFactory()` Returns an SSLSocketFactory whose behavior will depend on the SSL setting.
    `private static javax.net.ssl.TrustManager[]` | `trustManagers()`

    - ### 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`

- - ### Field Detail

    - #### factorySingleton

          private static javax.net.ssl.SSLSocketFactory factorySingleton

    - #### ssl

          private final java.lang.String ssl

    - #### socket

          private final java.net.Socket socket

  - ### Constructor Detail

    - #### SocketFactories.TdsTlsSocketFactory

          public SocketFactories.TdsTlsSocketFactory(java.lang.String ssl,
                                             java.net.Socket socket)

      Constructs a TdsTlsSocketFactory.
      Parameters:
        `ssl` - the SSL setting
        `socket` - the TCP/IP socket to wrap

  - ### Method Detail

    - #### createSocket

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

      Create the SSL socket.

      NB. This method will actually create a connected socket over the TCP/IP network socket supplied via the constructor of this factory class.
      Specified by:
        `createSocket` in class `javax.net.SocketFactory`
      Throws:
        `java.io.IOException`
        `java.net.UnknownHostException`

    - #### 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.net.InetAddress host,
                                     int port,
                                     java.net.InetAddress localHost,
                                     int localPort)
                                       throws java.io.IOException

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

    - #### getFactory

          private javax.net.ssl.SSLSocketFactory getFactory()
                                                     throws java.io.IOException

      Returns an SSLSocketFactory whose behavior will depend on the SSL setting.
      Returns:
        an `SSLSocketFactory`
      Throws:
        `java.io.IOException`

    - #### factory

          private static javax.net.ssl.SSLSocketFactory factory()
                                                         throws java.security.NoSuchAlgorithmException,
                                                                java.security.KeyManagementException

      Returns an SSLSocketFactory whose sockets will not authenticate the server.
      Returns:
        an `SSLSocketFactory`
      Throws:
        `java.security.NoSuchAlgorithmException`
        `java.security.KeyManagementException`

    - #### trustManagers

          private static javax.net.ssl.TrustManager[] trustManagers()

Generated on June 8 2013