Schnittstelle IDUUIProcessHandler
- Alle Superschnittstellen:
Runnable
- Alle bekannten Implementierungsklassen:
DUUISimpleProcessHandler
An interface for running processes with DUUI.
- Autor:
- Cedric Borkowski
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
cancel()
Called when the process is cancelled.void
exit()
Called at the end of any process to clean up resources and make final updates to the process and documents.Retrieves the pipeline id for the pipeline that is used in the current process.Retrieves the current process' id.Retrieves the current status of the process.Retrieves the user id of the user that has started the process.void
Called when the process is completed.void
onException
(Exception exception) When an exception is thrown this method should be called to handle the exception and update the process as well as documents before the exit method.void
Optional method for resource clean up when the server is stopped.void
process()
Calls the run method of aDUUIComposer
with aDUUIDocumentReader
as the input.void
Calls the run method of aDUUIComposer
with a JCas as the input.void
shutdown()
Called when the process and pipeline should be shut down.void
Set up the input reader and load documents from the specified source.void
update()
Called every x seconds to update the state of the process and documents in the database.
-
Methodendetails
-
startInput
void startInput()Set up the input reader and load documents from the specified source. -
processText
void processText()Calls the run method of aDUUIComposer
with a JCas as the input. This is a single document process. -
process
void process()Calls the run method of aDUUIComposer
with aDUUIDocumentReader
as the input. This method is used to process multiple documents in parallel. -
update
void update()Called every x seconds to update the state of the process and documents in the database. -
onException
When an exception is thrown this method should be called to handle the exception and update the process as well as documents before the exit method.- Parameter:
exception
- the exception that has been thrown during processing.
-
onCompletion
void onCompletion()Called when the process is completed. -
cancel
void cancel()Called when the process is cancelled. -
shutdown
void shutdown()Called when the process and pipeline should be shut down. -
exit
void exit()Called at the end of any process to clean up resources and make final updates to the process and documents. -
onServerStopped
void onServerStopped()Optional method for resource clean up when the server is stopped. -
getProcessID
String getProcessID()Retrieves the current process' id.- Gibt zurück:
- the
ObjectId
of the current process as aString
.
-
getPipelineID
String getPipelineID()Retrieves the pipeline id for the pipeline that is used in the current process.- Gibt zurück:
- the
ObjectId
of the pipeline as aString
.
-
getUserID
String getUserID()Retrieves the user id of the user that has started the process.- Gibt zurück:
- the
ObjectId
of the user that started the process as aString
.
-
getStatus
String getStatus()Retrieves the current status of the process.- Gibt zurück:
- one of
DUUIStatus
-