I would like the ability to control the socket creation so
that I can supply a secure socket.
If MysqlIO had a no-args constructor, and a separate
method to do the work of the current constructor then I
could derive my own connection and override
createNewIO to return my own derived class of
MysqlIO. Right now that doesn't work because the
socket creation code is in the MysqlIO constructor and
can't be overridden.
Alternatively, if I could pass in a SocketFactory to a
connection that would handle the issue as well.
Am I missing something? Is there some way to do this
without changing the sources?
I'm happy to submit a patch if someone can tell me
which approach is most likely to be considered for
Log in to post a comment.