C H A P T E R  9

Image

The Asynchronous Channel API

We've finally reached the most powerful feature introduced in NIO.2, the asynchronous channel API. As you'll see in this chapter, the asynchronous I/O (AIO) Java 7 journey starts in the java.nio.channels.AsynchronousChannel interface, which extends a channel with asynchronous I/O operations support. This interface is implemented by three classes: AsynchronousFileChannel, AsynchronousSocketChannel, and AsynchronousServerSocketChannel. There is a fourth class, AsynchronousDatagramChannel, which was added in the Java 7 beta release and then removed in the Java 7 final release; at this writing, this ...

Get Pro Java 7 NIO.2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.