Java 2 SDK for Solaris Developer's Guide

Poller Class Demonstration

The new Poller class provides Java applications with the ability to efficiently access the functionality of the C poll(2) routine. The demonstration code with the Java 2 SDK for Solaris is provided with a sample usage server in

${JAVA_HOME}/demo/jni/Poller

The demonstration code shows a means of determining the I/O status of multiple I/O objects with one call.

The JNI C code supporting the Poller class is optimized to take full advantage of Solaris 7 operating environment poll(2) kernel caching. It can be compiled to take advantage of /dev/poll, a faster kernel-polling mechanism available with Solaris 7 system software update 2 and subsequent versions.

See Appendix C, Poller Class Usage for more detailed information about the Poller class.