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