Currently in FTPSClient class, there is protected openDataConnection method, which create SSLSocket for data connection. But there is no hook to customize the SSLSocket before startHandshake is called.
I need to know the remote host ip and port, which i can get for socket, and do custom setup to try to reuse SSL sessions from control connection socket. Since the socket factory uses createSocket() method, I can't just use custom socket factory since I don't know the host and port. I can't just override the openDataConnection() method in my class since that will call the startHandshake().
So it would be nice if you can provide hook, much like connectAction(), but for data connection before handshake is started. You can pass the new data socket as argument to this hook method so one can get remote host and port information.