19 package org.sleuthkit.autopsy.ingest;
21 import java.util.List;
27 class IngestJobInputStream
implements IngestStream {
29 private final IngestJob ingestJob;
30 private boolean closed =
false;
31 private boolean isStopped =
false;
32 private final IngestJobStartResult ingestJobStartResult;
40 IngestJobInputStream(IngestJob ingestJob) {
41 this.ingestJob = ingestJob;
42 ingestJobStartResult = IngestManager.getInstance().startIngestJob(ingestJob);
50 IngestJobStartResult getIngestJobStartResult() {
51 return ingestJobStartResult;
55 public synchronized void addFiles(List<Long> fileObjectIds)
throws IngestStreamClosedException {
57 throw new IngestStreamClosedException(
"Can not add files - ingest stream is closed");
59 ingestJob.addStreamingIngestFiles(fileObjectIds);
63 public IngestJob getIngestJob() {
68 public synchronized void close() {
70 ingestJob.processStreamingIngestDataSource();
74 public synchronized boolean isClosed() {
79 public synchronized void stop() {
81 this.isStopped =
true;
83 ingestJob.cancel(IngestJob.CancellationReason.USER_CANCELLED);
87 public synchronized boolean wasStopped() {