| Executable.java |
1 /*
2 * Copyright (c) 1998-2004, The University of Sheffield.
3 *
4 * This file is part of GATE (see http://gate.ac.uk/), and is free
5 * software, licenced under the GNU Library General Public License,
6 * Version 2, June 1991 (in the distribution as file licence.html,
7 * and also available at http://gate.ac.uk/gate/licence.html).
8 *
9 * Valentin Tablan 21 Sep 2001
10 *
11 * $Id: Executable.java,v 1.4 2004/07/21 17:10:02 akshay Exp $
12 */
13 package gate;
14
15 import gate.creole.ExecutionException;
16
17 /**
18 * Describes entities that can be executed such as {@link ProcessingResource}s
19 * or {@link Controller}s.
20 */
21 public interface Executable {
22
23 /**
24 * Starts the execution of this executable
25 */
26 public void execute() throws ExecutionException;
27
28 /**
29 * Notifies this executable that it should stop its execution as soon as
30 * possible.
31 */
32 public void interrupt();
33
34 /**
35 * Returns true if this executable has been interrupted via the
36 * {@link #interrupt()} method since the last time its {@link #execute()} method
37 * was called
38 */
39 public boolean isInterrupted();
40 }