posted 21 years ago
I haven't used this NIO stuff yet. It looks pretty cool. SocketChannel for instance implements InterruptableChannel so you can do an asynch close(). You might make a class (maybe inner?) that implements Runnable, waits for a while and then closes the channel. Exceptions will ensue no doubt. Just thinking out loud, imagine what ChannelWatcher would do with a channel argument and a number of milliseconds to wait ...
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi