|
ProcessingResource |
|
1 /* 2 * ProcessingResource.java 3 * 4 * Copyright (c) 1998-2001, The University of Sheffield. 5 * 6 * This file is part of GATE (see http://gate.ac.uk/), and is free 7 * software, licenced under the GNU Library General Public License, 8 * Version 2, June 1991 (in the distribution as file licence.html, 9 * and also available at http://gate.ac.uk/gate/licence.html). 10 * 11 * Hamish Cunningham, 11/Feb/2000 12 * 13 * $Id: ProcessingResource.java,v 1.10 2001/09/26 18:23:05 valyt Exp $ 14 */ 15 16 package gate; 17 18 import java.util.*; 19 20 import gate.util.*; 21 import gate.creole.*; 22 23 /** Models all sorts of processing resources. 24 * Because <CODE>run()</CODE> doesn't throw exceptions, we 25 * have a <CODE>check()</CODE> that will re-throw any exception 26 * that was caught when <CODE>run()</CODE> was invoked. 27 */ 28 public interface ProcessingResource extends Resource, Executable 29 { 30 31 /** 32 * Reinitialises the processing resource. After calling this method the 33 * resource should be in the state it is after calling init. 34 * If the resource depends on external resources (such as rules files) then 35 * the resource will re-read those resources. If the data used to create 36 * the resource has changed since the resource has been created then the 37 * resource will change too after calling reInit(). 38 */ 39 public void reInit() throws ResourceInstantiationException; 40 41 /** 42 * Checks whether this PR has been interrupted since the lsat time its 43 * {@link execute()} method was called. 44 */ 45 public boolean isInterrupted(); 46 47 /** 48 * Notifies this PR that it should stop its execution as soon as possible. 49 */ 50 public void interrupt(); 51 52 } // interface ProcessingResource 53
|
ProcessingResource |
|