net.sourceforge.jtds.ssl
Class SocketFactoriesSUN.TdsTlsSocketFactory

java.lang.Object
  extended byjavax.net.SocketFactory
      extended bynet.sourceforge.jtds.ssl.SocketFactoriesSUN.TdsTlsSocketFactory
Enclosing class:
SocketFactoriesSUN

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

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


Field Summary
private static javax.net.ssl.SSLSocketFactory factorySingleton
           
private  java.net.Socket socket
           
private  java.lang.String ssl
           
 
Fields inherited from class javax.net.SocketFactory
 
Constructor Summary
SocketFactoriesSUN.TdsTlsSocketFactory(java.lang.String ssl, java.net.Socket socket)
          Constructs a TdsTlsSocketFactory.
 
Method Summary
 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 com.sun.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

SocketFactoriesSUN.TdsTlsSocketFactory

public SocketFactoriesSUN.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.

Throws:
java.io.IOException
java.net.UnknownHostException

createSocket

public java.net.Socket createSocket(java.net.InetAddress host,
                                    int port)
                             throws java.io.IOException
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
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
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 com.sun.net.ssl.TrustManager[] trustManagers()


Generated on October 27 2012