Mercurial > hg > blitz_condensed
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/dancres/blitz/notify/DispatchTask.java Sat Mar 21 11:00:06 2009 +0000 @@ -0,0 +1,28 @@ +package org.dancres.blitz.notify; + +/** + * DispatchTask represents an event processing task for the event queue. + * The lifecycle of this event is as follows: + * + * <ol> + * <li>The poster of the event invokes block() having enqueued this task. It may or may + * not actually block depending on the task's implementation.</li> + * + * <li>For each event generated, newDispatch is invoked to indicate an event + * will be posted.</li> + * + * <li>For each event generated, dispatched is invoked to indicate the event has + * been sent.</li> + * + * <li>When the event queue (as to the event senders) has finished generating events it + * invokes enableResolve which for suitable implementations indicates that the blocker + * can be released at the appropriate moment.</li> + * </ol> + */ +public interface DispatchTask extends Runnable { + public QueueEvent getEvent(); + public void block() throws InterruptedException; + public void newDispatch(); + public void dispatched(); + public void enableResolve(); +}