I'm trying to create my own implementation of javax.net.ssl.SSLSocketFactory
, in order to catch all HTTP/SSL requests, send by a third-party library, and log them. This is how the factory is called in that library (it's commons-httpclient):
import javax.net.ssl.SSLSocketFactory;
// ...
return SSLSocketFactory.getDefault().createSocket(host, port);
Current implementation used is com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
. How can I change it to my own custom class?