com.nativex.advertiser
Class EasySSLSocketFactory
java.lang.Object
org.apache.http.conn.ssl.SSLSocketFactory
com.nativex.advertiser.EasySSLSocketFactory
- All Implemented Interfaces:
- LayeredSocketFactory, SocketFactory
public class EasySSLSocketFactory
- extends SSLSocketFactory
Handles the SSL connection.
- Author:
- matthew.macgregor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sslContext
private SSLContext sslContext
EasySSLSocketFactory
public EasySSLSocketFactory(KeyStore truststore)
throws NoSuchAlgorithmException,
KeyManagementException,
KeyStoreException,
UnrecoverableKeyException
- Creates a custom SSLSocket factory to handle connections to https.
- Throws:
NoSuchAlgorithmException
KeyManagementException
KeyStoreException
UnrecoverableKeyException
createSocket
public Socket createSocket(Socket socket,
String host,
int port,
boolean autoClose)
throws IOException,
UnknownHostException
- Creates an ssl socket using the underlying SSLContext.
- Specified by:
createSocket
in interface LayeredSocketFactory
- Overrides:
createSocket
in class SSLSocketFactory
- Throws:
IOException
UnknownHostException
createSocket
public Socket createSocket()
throws IOException
- Specified by:
createSocket
in interface SocketFactory
- Overrides:
createSocket
in class SSLSocketFactory
- Throws:
IOException