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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.