public class CollectionProcessingEngine_impl extends Object implements CollectionProcessingEngine
Constructor and Description |
---|
CollectionProcessingEngine_impl() |
Modifier and Type | Method and Description |
---|---|
void |
addStatusCallbackListener(StatusCallbackListener aListener)
Registers a listener to receive status callbacks.
|
void |
asynchStop() |
CasProcessor[] |
getCasProcessors()
Gets the
CasProcessors s in this CPE, in the order in which they will be
executed. |
BaseCollectionReader |
getCollectionReader()
Gets the Collection Reader for this CPE.
|
protected BaseCPMImpl |
getCPM() |
ProcessTrace |
getPerformanceReport()
Gets a performance report for the processing that is currently occurring or has just completed.
|
Progress[] |
getProgress()
Gets a progress report for the processing that is currently occurring or has just completed.
|
void |
initialize(CpeDescription aCpeDescription,
Map aAdditionalParams)
Initializes this CPE from a
cpeDescription Applications do not need to call this
method. |
boolean |
isPaused()
Determines whether this CPE's processing is currently paused.
|
boolean |
isProcessing()
Determines whether this CPE is currently processing.
|
void |
kill()
Kill CPM hard.
|
void |
pause()
Pauses processing.
|
void |
process()
Initiates processing of a collection.
|
void |
removeStatusCallbackListener(StatusCallbackListener aListener)
Unregisters a status callback listener.
|
void |
resume()
Resumes processing that has been paused.
|
void |
stop()
Stops processing.
|
public void initialize(CpeDescription aCpeDescription, Map aAdditionalParams) throws ResourceInitializationException
CollectionProcessingEngine
cpeDescription
Applications do not need to call this
method. It is called automatically by the framework and cannot be called a second time.initialize
in interface CollectionProcessingEngine
aCpeDescription
- CPE description, generally parsed from an XML fileaAdditionalParams
- a Map containing additional parameters. May be null
if there are no
parameters. Each class that implements this interface can decide what additional
parameters it supports.ResourceInitializationException
- if a failure occurs during initialization.public void addStatusCallbackListener(StatusCallbackListener aListener)
CollectionProcessingEngine
addStatusCallbackListener
in interface CollectionProcessingEngine
aListener
- the listener to addpublic void removeStatusCallbackListener(StatusCallbackListener aListener)
CollectionProcessingEngine
removeStatusCallbackListener
in interface CollectionProcessingEngine
aListener
- the listener to removepublic void process() throws ResourceInitializationException
CollectionProcessingEngine
CollectionProcessingEngine.addStatusCallbackListener(StatusCallbackListener)
method.
A CPE can only process one collection at a time. If this method is called while a previous
processing request has not yet completed, a UIMA_IllegalStateException
will
result. To find out whether a CPE is free to begin another processing request, call the
CollectionProcessingEngine.isProcessing()
method.
process
in interface CollectionProcessingEngine
ResourceInitializationException
- if an error occurs during initializationpublic boolean isProcessing()
CollectionProcessingEngine
CollectionProcessingEngine.stop()
ped. If processing is paused,
this method will still return true
.isProcessing
in interface CollectionProcessingEngine
public void pause()
CollectionProcessingEngine
CollectionProcessingEngine.resume()
method.pause
in interface CollectionProcessingEngine
public boolean isPaused()
CollectionProcessingEngine
isPaused
in interface CollectionProcessingEngine
public void resume()
CollectionProcessingEngine
resume
in interface CollectionProcessingEngine
public void stop()
CollectionProcessingEngine
stop
in interface CollectionProcessingEngine
public void kill()
CollectionProcessingEngine
kill
in interface CollectionProcessingEngine
public void asynchStop()
public ProcessTrace getPerformanceReport()
CollectionProcessingEngine
getPerformanceReport
in interface CollectionProcessingEngine
public Progress[] getProgress()
CollectionProcessingEngine
getProgress
in interface CollectionProcessingEngine
Progress
objects, each of which represents the progress in a
different set of units (for example number of entities or bytes)protected BaseCPMImpl getCPM()
public CasProcessor[] getCasProcessors()
CollectionProcessingEngine
CasProcessors
s in this CPE, in the order in which they will be
executed.getCasProcessors
in interface CollectionProcessingEngine
CasProcessor
spublic BaseCollectionReader getCollectionReader()
CollectionProcessingEngine
getCollectionReader
in interface CollectionProcessingEngine
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.