I saw this question on SO:
Is there epoll equivalent in Java?
I conducted some research trying to figure out how to create something that watches for changes in a file descriptor using nio selectors and channels but I haven't made any progress. AsynchronousFileChannel does not implement SelectableChannel. I can't use a FileWatcher since the file descriptors I care about, GPIO pins, do not use inotify. What sort of channel do I need to create here and how?
Edit:
I'm aware of pi4j and Libbulldog, these use native modules to achieve gpio access. pi4j doesn't work with the BeagleBone and Libbulldog is a dead project. I was hoping for a pure Java answer. Why would epoll
be implemented in SelectorProvider
if not for this sort of thing?