Hi,
I wanted to post here changes for reviewing.
Recently I figured out, that we have bug in SSL engine, because we tried
to store SSL connection information in SSLSession, which is wrong, as
session could be shared among several connections. So, it means we need
some other place, where connection info could be stored.
IMHO SelectionKey attachment could be good place for it. But currently
in Grizzly we have non-clear attachment support implementation. There
are several attachments types, which we support internally and using
if-else/instanceof to process each of attachment type. So I decided to
create SelectionKey attachment class hierarchy. Here I'm attaching
initial propose for that. Unfortunately with 1.x branch I can not apply
all the changes I wanted, so I didn't change CallbackHandler to be
subclass of SelectionKeyAttachment, however SSL support is completely
reworked and should not have bug I mentioned above.
Think, in 2.x branch we will be able to have clear and complete
SelectionKey attachment implementation, which will include
CallbackHandlers etc.
Thanks.
WBR,
Alexey.