Hi Oleg,

I'm confident we can find an interface that serves the need of
both NIO and Async without this ugly split. Maybe you can explain
how you want to open connections in the NIO case? Like in the
examples, let the application open the socket synchronously and
then simply use it in the NIO classes? Or will there be an "open"
call that just triggers an operation which completes only later?
Could we use the trick from the transmitter and receiver, where
the thread calling the operation is blocked until the background
thread has done the work? Would it help to redeclare "open" as
an operation that may complete asynchronously? Setting the target
and/or proxy host can be done immediately, and the meaning of
isOpen() could be changed, or an extra state can be introduced.
Or we declare "open" an optional operation that can throw an
UnsupportedOperationException, like Iterator.remove().
If it isn't called anyway, what does it matter if it's there?

cheers,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to