1 /** 2 * Copyright (c) 2002-2005, Simone Bordet 3 * All rights reserved. 4 * 5 * This software is distributable under the BSD license. 6 * See the terms of the BSD license in the documentation provided with this software. 7 */ 8 9 package foxtrot; 10 11 /** 12 * Synchronous Foxtrot workers use an implementation of this interface 13 * to pump AWT events from the standard AWT Event Queue while executing 14 * {@link Task}s. <br /> 15 * Implementations are required to provide a parameterless public constructor. 16 * @version $Revision: 1.4 $ 17 */ 18 public interface EventPump 19 { 20 /** 21 * Pumps AWT events from the standard AWT Event Queue and dispatches the events until the 22 * given <code>task</code> is {@link Task#isCompleted completed}; <strong>must</strong> be 23 * called from the Event Dispatch Thread. <br /> 24 * No Exceptions (included RuntimeExceptions) or Errors should escape this method: 25 * it must return <strong>only</strong> when the task is completed. 26 */ 27 public void pumpEvents(Task task); 28 } 29