public class ScannerVisitor extends SimpleFileVisitor<Path> implements Callable<Path>
| Constructor and Description |
|---|
ScannerVisitor(Path path,
BlockingQueue<TikaDocument> queue,
DocumentFactory factory,
Options<String> options)
Instantiate a new task for scanning the given path.
|
| Modifier and Type | Method and Description |
|---|---|
Path |
call()
Recursively walks the file tree of a directory.
|
FileVisitResult |
preVisitDirectory(Path directory,
BasicFileAttributes attributes) |
FileVisitResult |
visitFile(Path file,
BasicFileAttributes attributes) |
FileVisitResult |
visitFileFailed(Path file,
IOException e) |
ScannerVisitor |
withLatch(SealableLatch latch) |
ScannerVisitor |
withMonitor(Notifiable monitor) |
postVisitDirectorypublic ScannerVisitor(Path path, BlockingQueue<TikaDocument> queue, DocumentFactory factory, Options<String> options)
path - the path to scanpublic ScannerVisitor withMonitor(Notifiable monitor)
public ScannerVisitor withLatch(SealableLatch latch)
public Path call() throws Exception
public FileVisitResult preVisitDirectory(Path directory, BasicFileAttributes attributes) throws IOException
preVisitDirectory in interface FileVisitor<Path>preVisitDirectory in class SimpleFileVisitor<Path>IOExceptionpublic FileVisitResult visitFile(Path file, BasicFileAttributes attributes) throws IOException
visitFile in interface FileVisitor<Path>visitFile in class SimpleFileVisitor<Path>IOExceptionpublic FileVisitResult visitFileFailed(Path file, IOException e) throws IOException
visitFileFailed in interface FileVisitor<Path>visitFileFailed in class SimpleFileVisitor<Path>IOExceptionCopyright © 2018. All rights reserved.