The Artima Developer Community
Sponsored Link

Java Buzz Forum
Flexible Event Delivery with Executors

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Scott Delap

Posts: 1154
Nickname: scottdelap
Registered: Sep, 2004

Client / Server application developer.
Flexible Event Delivery with Executors Posted: Mar 25, 2005 9:37 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Scott Delap.
Original Post: Flexible Event Delivery with Executors
Feed Title: ClientJava.com
Feed URL: http://www.clientjava.com/archives/wireless_mobile.rdf
Feed Description: Client/Desktop Related Java Development
Latest Java Buzz Posts
Latest Java Buzz Posts by Scott Delap
Latest Posts From ClientJava.com

Advertisement

Excellent article using concurrency utilities in association with event listeners. Lots of good ideas in this article about isolation, thread pooling, synchronization, etc.

Flexible Event Delivery with Executors
Every Java programmer is familiar with the EventListener pattern of asynchronous event delivery. Most have also written the boilerplate code needed to manage listeners and deliver events to other components. Listeners are simple, familiar, flexible, and easy to implement, but they call into code written by other developers, which can cause problems:

    * A slow listener can take too long to handle an event, starving the other listeners and possibly deadlocking your component.

    * When you dispatch an event to listeners, you control which thread will deliver it. Typically, the developers who implement the listeners have no control over how events are delivered to their code.

    * In a multimedia application, it is not clear how to synchronize GUI events (like animation and user actions) with other asynchronous event streams (like speech, sound, and video).

This article uses Doug Lea's Executor (now part of J2SE 5.0) to make event dispatch more flexible.

Read: Flexible Event Delivery with Executors

Topic: Thoughts on Basecamp features Previous Topic   Next Topic Topic: INGAP closer to cure diabetes

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use