Package org.apache.calcite.runtime
Class TrustAllSslSocketFactory
- java.lang.Object
-
- javax.net.SocketFactory
-
- org.apache.calcite.runtime.SocketFactoryImpl
-
- org.apache.calcite.runtime.TrustAllSslSocketFactory
-
public class TrustAllSslSocketFactory extends SocketFactoryImpl
Socket factory that trusts all SSL connections.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
TrustAllSslSocketFactory.DummyTrustManager
Implementation ofX509TrustManager
that trusts all certificates.
-
Field Summary
Fields Modifier and Type Field Description private static TrustAllSslSocketFactory
DEFAULT
private javax.net.ssl.SSLSocketFactory
sslSocketFactory
-
Fields inherited from class org.apache.calcite.runtime.SocketFactoryImpl
LINGER, OOBINLINE, SO_CONNECT_TIMEOUT, SO_KEEPALIVE, SO_LINGER, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TrustAllSslSocketFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.Socket
createSocket()
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)
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)
static javax.net.ssl.SSLSocketFactory
createSSLSocketFactory()
Creates an "accept-all" SSLSocketFactory - ssl sockets will accept ANY certificate sent to them - thus effectively just securing the communications.static TrustAllSslSocketFactory
getDefault()
static javax.net.ssl.SSLSocketFactory
getDefaultSSLSocketFactory()
-
Methods inherited from class org.apache.calcite.runtime.SocketFactoryImpl
applySettings
-
-
-
-
Field Detail
-
DEFAULT
private static final TrustAllSslSocketFactory DEFAULT
-
sslSocketFactory
private final javax.net.ssl.SSLSocketFactory sslSocketFactory
-
-
Method Detail
-
createSocket
public java.net.Socket createSocket() throws java.io.IOException
- Overrides:
createSocket
in classSocketFactoryImpl
- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress host, int port) throws java.io.IOException
- Overrides:
createSocket
in classSocketFactoryImpl
- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort) throws java.io.IOException
- Overrides:
createSocket
in classSocketFactoryImpl
- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException
- Overrides:
createSocket
in classSocketFactoryImpl
- 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
- Overrides:
createSocket
in classSocketFactoryImpl
- Throws:
java.io.IOException
-
getDefault
public static TrustAllSslSocketFactory getDefault()
- See Also:
SocketFactory.getDefault()
-
getDefaultSSLSocketFactory
public static javax.net.ssl.SSLSocketFactory getDefaultSSLSocketFactory()
-
createSSLSocketFactory
public static javax.net.ssl.SSLSocketFactory createSSLSocketFactory()
Creates an "accept-all" SSLSocketFactory - ssl sockets will accept ANY certificate sent to them - thus effectively just securing the communications. This could be set in a HttpsURLConnection using HttpsURLConnection.setSSLSocketFactory(.....)- Returns:
- SSLSocketFactory
-
-