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.11 2003/01/10 13:12:29 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  } // interface ProcessingResource
41