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 |
private static javax.net.ssl.SSLSocketFactory |
factorySingleton
|
private java.net.Socket |
socket
|
private java.lang.String |
ssl
|
Fields inherited from class javax.net.SocketFactory |
|
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 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 |
factorySingleton
private static javax.net.ssl.SSLSocketFactory factorySingleton
ssl
private final java.lang.String ssl
socket
private final java.net.Socket socket
SocketFactories.TdsTlsSocketFactory
public SocketFactories.TdsTlsSocketFactory(java.lang.String ssl,
java.net.Socket socket)
- Constructs a TdsTlsSocketFactory.
- Parameters:
ssl
- the SSL settingsocket
- the TCP/IP socket to wrap
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 javax.net.ssl.TrustManager[] trustManagers()
Generated on October 27 2012