Class Ingestor

java.lang.Object
org.opencastproject.ingest.scanner.Ingestor
All Implemented Interfaces:
Runnable

public class Ingestor extends Object implements Runnable
Used by the InboxScannerService to do the actual ingest.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Ingestor(org.opencastproject.ingest.api.IngestService ingestService, org.opencastproject.security.util.SecurityContext secCtx, String workflowDefinition, Map<String,String> workflowConfig, String mediaFlavor, File inbox, int maxThreads, org.opencastproject.series.api.SeriesService seriesService, int maxTries, int secondsBetweenTries, Optional<Pattern> metadataPattern, DateTimeFormatter dateFormatter, org.opencastproject.scheduler.api.SchedulerService schedulerService, String ffprobe, boolean matchSchedule, float matchThreshold, org.opencastproject.workspace.api.Workspace workspace)
    Create new ingestor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canHandle(File artifact)
    Return true if the passed artifact can be handled by this ingestor, false if not (e.g. it lies outside of inbox or its name starts with a ".")
    void
    cleanup(File artifact)
     
    void
    ingest(File artifact)
    Asynchronous ingest of an artifact.
     
    void
    run()
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Ingestor

      public Ingestor(org.opencastproject.ingest.api.IngestService ingestService, org.opencastproject.security.util.SecurityContext secCtx, String workflowDefinition, Map<String,String> workflowConfig, String mediaFlavor, File inbox, int maxThreads, org.opencastproject.series.api.SeriesService seriesService, int maxTries, int secondsBetweenTries, Optional<Pattern> metadataPattern, DateTimeFormatter dateFormatter, org.opencastproject.scheduler.api.SchedulerService schedulerService, String ffprobe, boolean matchSchedule, float matchThreshold, org.opencastproject.workspace.api.Workspace workspace)
      Create new ingestor.
      Parameters:
      ingestService - media packages are passed to the ingest service
      secCtx - security context needed for ingesting with the IngestService or for putting files into the working file repository
      workflowDefinition - workflow to apply to ingested media packages
      workflowConfig - the workflow definition configuration
      mediaFlavor - media flavor to use by default
      inbox - inbox directory to watch
      maxThreads - maximum worker threads doing the actual ingest
      seriesService - reference to the active series service
      maxTries - maximum tries for a ingest job
      secondsBetweenTries - time between retires in seconds
      metadataPattern - regular expression pattern for matching metadata in file names
      dateFormatter - date formatter pattern for parsing temporal metadata
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • ingest

      public void ingest(File artifact)
      Asynchronous ingest of an artifact.
    • canHandle

      public boolean canHandle(File artifact)
      Return true if the passed artifact can be handled by this ingestor, false if not (e.g. it lies outside of inbox or its name starts with a ".")
    • cleanup

      public void cleanup(File artifact)
    • myInfo

      public String myInfo()