Interface DistributionService

All Known Subinterfaces:
DownloadDistributionService, StreamingDistributionService

public interface DistributionService
Distributes elements from MediaPackages to distribution channels.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
    A prefix used by distribution service implementations to indicate the types of distribution channels they manage.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.opencastproject.job.api.Job
    distribute(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, String elementId)
    Distribute a media package element.
    List<org.opencastproject.mediapackage.MediaPackageElement>
    distributeSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, String elementId)
    Distributes a media package element synchronously, bypassing the Opencast job system.
    Returns the distribution type for this service.
    org.opencastproject.job.api.Job
    retract(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, String elementId)
    Retract a media package element from the distribution channel.
    List<org.opencastproject.mediapackage.MediaPackageElement>
    retractSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, String elementId)
    Retract a media package element from the distribution channel synchronously, bypassing the Opencast job system.
  • Field Details

    • JOB_TYPE_PREFIX

      static final String JOB_TYPE_PREFIX
      A prefix used by distribution service implementations to indicate the types of distribution channels they manage.
      See Also:
    • CONFIG_KEY_STORE_TYPE

      static final String CONFIG_KEY_STORE_TYPE
      See Also:
  • Method Details

    • distribute

      org.opencastproject.job.api.Job distribute(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, String elementId) throws DistributionException, org.opencastproject.mediapackage.MediaPackageException
      Distribute a media package element.
      Parameters:
      mediapackage - the media package
      elementId - the element in the media package to distribute
      Returns:
      The job
      Throws:
      DistributionException - if there was a problem distributing the media
      org.opencastproject.mediapackage.MediaPackageException - if there was a problem with the mediapackage element
    • distributeSync

      List<org.opencastproject.mediapackage.MediaPackageElement> distributeSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, String elementId) throws DistributionException, org.opencastproject.mediapackage.MediaPackageException
      Distributes a media package element synchronously, bypassing the Opencast job system.
      Parameters:
      mediapackage - the media package
      elementId - the element in the media package to distribute
      Returns:
      list of distributed media package elements
      Throws:
      DistributionException - if there was a problem distributing the media
      org.opencastproject.mediapackage.MediaPackageException - if there was a problem with the mediapackage element
    • retract

      org.opencastproject.job.api.Job retract(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, String elementId) throws DistributionException
      Retract a media package element from the distribution channel.
      Parameters:
      mediaPackage - the media package
      elementId - the media package element to retract
      Throws:
      DistributionException - if there was a problem retracting the mediapackage
    • retractSync

      List<org.opencastproject.mediapackage.MediaPackageElement> retractSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, String elementId) throws DistributionException, org.opencastproject.mediapackage.MediaPackageException
      Retract a media package element from the distribution channel synchronously, bypassing the Opencast job system.
      Parameters:
      mediaPackage - the media package
      elementId - the media package element to retract
      Returns:
      list of retracted media package elements
      Throws:
      DistributionException - if there was a problem retracting the mediapackage
      org.opencastproject.mediapackage.MediaPackageException
    • getDistributionType

      String getDistributionType()
      Returns the distribution type for this service. This type should be unique within an Opencast instance, and is used to select where file distribution happens.
      Returns:
      The distribution type. A string like "download", or "streaming"