|
GATE Version 3.1-2270 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.creole.AbstractProcessingResource
public abstract class AbstractProcessingResource
A convenience implementation of ProcessingResource with some default code.
| Nested Class Summary | |
|---|---|
protected class |
AbstractProcessingResource.InternalStatusListener
A simple status listener used to forward the events upstream. |
protected class |
AbstractProcessingResource.IntervalProgressListener
A progress listener used to convert a 0..100 interval into a smaller one |
| Field Summary | |
|---|---|
protected boolean |
interrupted
|
| Fields inherited from class gate.creole.AbstractResource |
|---|
name |
| Fields inherited from class gate.util.AbstractFeatureBearer |
|---|
features |
| Constructor Summary | |
|---|---|
AbstractProcessingResource()
|
|
| Method Summary | |
|---|---|
void |
addProgressListener(ProgressListener l)
Adds a ProgressListener to the list of listeners for
this processing resource. |
void |
addStatusListener(StatusListener l)
Adds a StatusListener to the list of listeners for
this processing resource |
void |
cleanup()
should clear all internal data of the resource. |
void |
execute()
Run the resource. |
protected void |
fireProcessFinished()
Notifies all the ProgressListeners of a progress
finished. |
protected void |
fireProgressChanged(int e)
Notifies all the ProgressListeners of a progress change
event. |
protected void |
fireStatusChanged(String e)
Notifies all the StatusListeners of a change of status. |
Resource |
init()
Initialise this resource, and return it. |
void |
interrupt()
Notifies this PR that it should stop its execution as soon as possible. |
boolean |
isInterrupted()
Checks whether this PR has been interrupted since the last time its execute() method was called. |
void |
reInit()
Reinitialises the processing resource. |
void |
removeProgressListener(ProgressListener l)
Removes a ProgressListener from the list of listeners
for this processing resource. |
void |
removeStatusListener(StatusListener l)
Removes a StatusListener from the list of listeners for
this processing resource |
| Methods inherited from class gate.creole.AbstractResource |
|---|
checkParameterValues, getBeanInfo, getName, getParameterValue, getParameterValue, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
| Methods inherited from class gate.util.AbstractFeatureBearer |
|---|
getFeatures, setFeatures |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gate.Resource |
|---|
getParameterValue, setParameterValue, setParameterValues |
| Methods inherited from interface gate.util.FeatureBearer |
|---|
getFeatures, setFeatures |
| Methods inherited from interface gate.util.NameBearer |
|---|
getName, setName |
| Field Detail |
|---|
protected boolean interrupted
| Constructor Detail |
|---|
public AbstractProcessingResource()
| Method Detail |
|---|
public Resource init()
throws ResourceInstantiationException
init in interface Resourceinit in class AbstractResourceResourceInstantiationException
public void execute()
throws ExecutionException
execute in interface ExecutableExecutionException
public void reInit()
throws ResourceInstantiationException
init(). This
functionality must be overriden by derived classes as necessary.
reInit in interface ProcessingResourceResourceInstantiationExceptionpublic void cleanup()
cleanup in interface Resourcecleanup in class AbstractResourcepublic boolean isInterrupted()
execute() method was called.
isInterrupted in interface Executablepublic void interrupt()
interrupt in interface Executablepublic void removeStatusListener(StatusListener l)
StatusListener from the list of listeners for
this processing resource
public void addStatusListener(StatusListener l)
StatusListener to the list of listeners for
this processing resource
protected void fireStatusChanged(String e)
StatusListeners of a change of status.
e - the message describing the status changepublic void addProgressListener(ProgressListener l)
ProgressListener to the list of listeners for
this processing resource.
public void removeProgressListener(ProgressListener l)
ProgressListener from the list of listeners
for this processing resource.
protected void fireProgressChanged(int e)
ProgressListeners of a progress change
event.
e - the new value of execution completionprotected void fireProcessFinished()
ProgressListeners of a progress
finished.
|
GATE Version 3.1-2270 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||