The spacing is off. We use 2-space indentation.
I'll clean that up.
The addition of getServerSocket to TServerSocket seems unnecessary, since it's not used anywhere.
I added it for 2 reasons, one is similarity to TSocket.getSocket and the other if anyone want's to override TServerSocket, it would be nice to have the underlying socket. Case in point we would require something like that for Cassandra.
Why override TSocket.open() at all in TSSLSocket? TSocket throws an exception if it's already open, but TSSLSocket will silently continue. Is this a necessary/intended semantic change? If we don't need that change, do we need a TSSLSocket at all?
TSSLServerSocket also seems unnecessary.
That was just an idiomatic addition. Since everyone is used to Transport.open(). The override ignores the call if it's already open. I can remove it, if you feel that's unnecessary.
Would it be possible to get a separate unit test for TSSLSocketFactory? Maybe just set up a simple server-client pair and push some bytes around? The tutorial stuff is great, but it's not going to be part of our standard test suite, so we could break it by accident.
Do we require something more than the current TestTSSLSocketFactory that I added? It does use the underlying ServerTestBase for the tests, but uses a TSSLSocket and TSSLServerSocket from the TSSLSocketFactory as a simple client-server pair. Let me know if I misunderstood something there.
Hate to sounds pedantic, but do you mind using ifs with curly braces, even though the then clause is single-line? Just for readability/consistency.
Sure, I'll update it