T - The type of objects which will be created from this task.D - A sub type of CrawlerUrlDTO which this task will use to
create the result objects.public abstract class AbstractDocumentTask<T,D extends CrawlerUrlDTO> extends AbstractUrlTask<T,D>
AbstractUrlTask which takes a
ConcurrentLinkedQueue of D and loads the URL with JSOUP as
Document.crawler, taskResults| Constructor and Description |
|---|
AbstractDocumentTask(MediathekReader aCrawler,
java.util.concurrent.ConcurrentLinkedQueue<D> aUrlToCrawlDTOs) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
processDocument(D aUrlDTO,
Document aDocument)
In this method you have to use the JSOUP
Document to create a
object of the return type T. |
protected void |
processElement(D aUrlDTO)
In this method you have to use the element
D to create a object of
the return type T. |
getMaxElementsToProcesscompute, createNewOwnInstanceadapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnforkpublic AbstractDocumentTask(MediathekReader aCrawler, java.util.concurrent.ConcurrentLinkedQueue<D> aUrlToCrawlDTOs)
protected abstract void processDocument(D aUrlDTO, Document aDocument)
Document to create a
object of the return type T. Add the results to
AbstractRecursivConverterTask.taskResults.aUrlDTO - A DTO containing at least the URL of the given document.aDocument - The JSOUP Document.protected void processElement(D aUrlDTO)
AbstractRecursivConverterTaskD to create a object of
the return type T. Add the results to AbstractRecursivConverterTask.taskResults.processElement in class AbstractUrlTask<T,D extends CrawlerUrlDTO>aUrlDTO - A element to be processed.