public final class Crawler extends Object implements Interruptible, AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static class |
Crawler.AsyncCrawlerCallbackProcessor
This class methods is executed upon the completion of fetcher.
|
static class |
Crawler.Builder
A builder for crawler class.
|
| Modifier and Type | Method and Description |
|---|---|
static Crawler |
buildDefault()
Builds a new default instance of Crawler.
|
static Crawler.Builder |
builder()
Creates a new instance of Builder.
|
void |
close() |
Scheduler |
getScheduler()
Get the instance of scheduler used.
|
void |
interruptAndClose()
Interrupt a thread and then close it.
|
Crawler |
start()
Starts the crawler by starting a new thread to poll for jobs.
|
Crawler |
startAndClose()
Starts the crawler by starting a new thread to poll for jobs and close it
after the queue has reached 0.
|
public static Crawler.Builder builder()
public static Crawler buildDefault()
public Scheduler getScheduler()
public Crawler start()
public Crawler startAndClose() throws Exception
Exception - if this resource cannot be closed.public void interruptAndClose()
throws Exception
InterruptibleinterruptAndClose in interface InterruptibleException - Exception.public void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2018. All rights reserved.