comparison src/org/dancres/blitz/notify/DispatchTask.java @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 package org.dancres.blitz.notify;
2
3 /**
4 * DispatchTask represents an event processing task for the event queue.
5 * The lifecycle of this event is as follows:
6 *
7 * <ol>
8 * <li>The poster of the event invokes block() having enqueued this task. It may or may
9 * not actually block depending on the task's implementation.</li>
10 *
11 * <li>For each event generated, newDispatch is invoked to indicate an event
12 * will be posted.</li>
13 *
14 * <li>For each event generated, dispatched is invoked to indicate the event has
15 * been sent.</li>
16 *
17 * <li>When the event queue (as to the event senders) has finished generating events it
18 * invokes enableResolve which for suitable implementations indicates that the blocker
19 * can be released at the appropriate moment.</li>
20 * </ol>
21 */
22 public interface DispatchTask extends Runnable {
23 public QueueEvent getEvent();
24 public void block() throws InterruptedException;
25 public void newDispatch();
26 public void dispatched();
27 public void enableResolve();
28 }