JDK-4137450 : Need FileEvent class
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 1998-05-12
  • Updated: 1998-05-14
  • Resolved: 1998-05-14
Related Reports
Duplicate :  
Description

Name: el35337			Date: 05/12/98


In order to combine JAVA with a native library
for messaging I need to be informed, whenever
data is available from a given filedescriptor.
This would imply to wrap a filedesc from C into
java and register a listener to a FileEvent on
this file descriptor. This is only needed in 
conjunction with AWT. So I would like to do :

int fd = myNativeFunction(someArgs);
FileDescriptor javaFD = new FileDescriptor(fd);
javaFD.addFileEventListener(new FileEventListener() {
	public void fileEventProcessed(int flags){
		myNativeProcessData();
	}
}
(Review ID: 28982)
======================================================================

Comments
WORK AROUND Name: el35337 Date: 05/12/98 Until now, a dedicated thread for listening is need, that performs busy waiting, thus consuming unnecessary system resources. ======================================================================
11-06-2004