Package com.yahoo.application.container
Class DocumentProcessing
java.lang.Object
com.yahoo.application.container.DocumentProcessing
For doing document processing with
JDisc.- Author:
- Einar M R Rosenvinge
-
Method Summary
Modifier and TypeMethodDescriptioncom.yahoo.processing.execution.chain.ChainRegistry<com.yahoo.docproc.DocumentProcessor>Returns a registry of configured docproc chains.com.yahoo.docproc.DocumentProcessor.Progressprocess(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing) Processes the given Processing through the specified chain.com.yahoo.docproc.DocumentProcessor.ProgressprocessOnce(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing) Processes the given Processing through the specified chain.
-
Method Details
-
process
public com.yahoo.docproc.DocumentProcessor.Progress process(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing) Processes the given Processing through the specified chain. Note that if oneDocumentProcessorin the chain returns aDocumentProcessor.LaterProgress, the calling thread will sleep for the duration specified inDocumentProcessor.LaterProgress#getDelay(), and then run again. This method will hence return when a document processor returnsDocumentProcessor.Progress#DONEorDocumentProcessor.Progress#FAILED, throws an exception, or if the calling thread is interrupted. This method will never return aDocumentProcessor.LaterProgress.- Parameters:
chain- the specification of the chain to executeprocessing- the Processing to process- Returns:
- Progress.DONE or Progress.FAILED
- Throws:
RuntimeException- if one of the document processors in the chain throws, or if the calling thread is interrupted
-
processOnce
public com.yahoo.docproc.DocumentProcessor.Progress processOnce(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing) Processes the given Processing through the specified chain. Note that if oneDocumentProcessorin the chain returns aDocumentProcessor.LaterProgress, it will be returned by this method. This method will hence return whenever a document processor returns anyDocumentProcessor.Progress, or throws an exception.- Parameters:
chain- the specification of the chain to executeprocessing- the Processing to process- Returns:
- any Progress
- Throws:
RuntimeException- if one of the document processors in the chain throws
-
getChains
public com.yahoo.processing.execution.chain.ChainRegistry<com.yahoo.docproc.DocumentProcessor> getChains()Returns a registry of configured docproc chains.- Returns:
- a registry of configured docproc chains
-
getDocumentTypes
-
getAnnotationTypes
-