Non-Blocking Events in Java

Motivation

Java event classes (EventListener, EventObject, etc.) use a simple thread model - event processing can block a program, making the program un-responsive. This can be overcome by manually utilizing threads during the event handling. 

The alternative is a multi-threaded event paradigm. Events are generated and processed in standard Java fashion, but they do not cause any blocking because processing takes place automatically in worker threads. Threads are stored in a thread pool to limit how many threads are created.

Event processing can be many things, such as:

Program implementation can be simplified - just respond to events: user actions, timer expiries and generic processing requests.

Source Code

Source code is available for non-commercial and non governmental use. Source code is not to be distributed in any way and copyright notice must remain in the source code. Compiled code can be distributed as long as it remains restricted: not for commercial or governmental use and reverse compiling must be prohibited. 

Download here.

 

Copyright © 2004  orangesoftware.net