Hi,
Karsten Ohme wrote:
> Hi,
>
> in the class TCPSelectorHandler the SelectionKey has an attachment of a CallbackHandler. The
> DefaultSelectionKeyHandler epects in its expire method a Long, how can both concepts coexist?
Nice catch! This is a bug as I suspect the ClassCastException in
DefaultSelectionKeyhandler (line 94) will show up if the log level is
set to FINEST. I did introduce that problem recently when I decided to
leave the CallbackHandler attached to the SelectionKey for the life time
of the key. One trivial solution is to add an instanceof call in
DefaultSelectionKeyhandler, but I really don't like it. The alternative
is to wrap the CallbackHandler provided by the client with an internal
one that has a long field. Will work on it :-)
Thanks for the feedback!
-- Jeanfrancois
>
> Karsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>