|
New I/0 Functionality for JavaTM 2 Standard Edition 1.4(13) After accepting the request, you could get the channel from the socket, make it non-blocking, and register that with the selector, too. This framework just provides the basiCS of using the NIO classes within a Web server. For additional information about creating a multi-threaded server, see the JavaWorld article referenced in the Java.sun.com/developer/technicalArticles/releases/nio/#Resources">Resources section. ConclusionThe New I/O features introdUCed to the J2SE version 1.4 Beta release provide exciting new ways to improve the performance of your programs. By taking advantage of the new capabilities, not only will they be faster but they can be mUCh more scalable because you won't have to worry about tasks like one thread per connection. This is especially important on the server side, greatly increasing the possible number of simultaneous connections supported. Note: If you look at the list of capabilities in JSR 51, you'll notice there is mention of scanning and formatting support, similar to C's printf. This feature didn't make the 1.4 beta release and will be saved for a later version.
|