gate
Interface ProcessingResource

All Superinterfaces:
FeatureBearer, Resource, Runnable, Serializable
All Known Subinterfaces:
Controller
All Known Implementing Classes:
AbstractProcessingResource, DefaultGazetteer, Namematch, DefaultTokeniser

public interface ProcessingResource
extends Resource, Runnable

Models all sorts of processing resources. Because run() doesn't throw exceptions, we have a check() that will re-throw any exception that was caught when run() was invoked.


Method Summary
 void check()
          Trigger any exception that was caught when run() was invoked.
 void reInit()
          Reinitialises the processing resource.
 
Methods inherited from interface gate.Resource
init
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, getName, setFeatures, setName
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

check

public void check()
           throws ExecutionException
Trigger any exception that was caught when run() was invoked.

reInit

public void reInit()
            throws ResourceInstantiationException
Reinitialises the processing resource. After calling this method the resource should be in the state it is after calling init. If the resource depends on external resources (such as rules files) then the resource will re-read those resources. If the data used to create the resource has changed since the resource has been created then the resource will change too after calling reInit().