Re: Subclassing SSLSocket
- From: Robert <RobertoNL@xxxxxxxxx>
- Date: Fri, 29 Jun 2007 12:38:25 -0000
Thank you for your answers!
I realize that I should delegate instead of subclassing, and indeed,
implementing a HandshakeCompletionListener would suffice.
However, this still gives me a problematic situation:
I am not actually creating SSLSocketFactory / SSLSocket objects
myself, but I would like to hook my own factories / sockets into the
JSSE system, and I'm trying to do this using the
"ssl.SocketFactory.provider" security property. My socketfactory would
simply delegate its tasks to the default socketfactory, but add a
HandshakeCompletionListener to the created socket before returning it.
Now, I believe this is not possible since:
1. The "default" SSLSocketFactory implementation can be accessed
through the ssl.SocketFactory.provider property
2. If I override the ssl.SocketFactory.provider property, how do I
create a SSLSocketFactory within my custom Factory?
First retrieving the default SSLSocketFactory by calling
SSLSocketFactory.getDefault() and then creating my custom class does
not work: after the default socketfactory has been created, changing
the ssl.SocketFactory.provider property has no effect.
How can I solve this?
Thanks,
Robert
.
- References:
- Subclassing SSLSocket
- From: Robert
- Re: Subclassing SSLSocket
- From: Esmond Pitt
- Subclassing SSLSocket
- Prev by Date: Re: Anonymous class - I don't know how to...
- Next by Date: Re: HTML elements = Java components
- Previous by thread: Re: Subclassing SSLSocket
- Next by thread: File Reading
- Index(es):