Interface StreamingDistributionService

All Superinterfaces:
DistributionService

public interface StreamingDistributionService extends DistributionService
Distributes elements from MediaPackages to distribution channels.
  • Method Details

    • publishToStreaming

      boolean publishToStreaming()
      Checks if streaming is enabled for the current tenant.
      Returns:
      whether streaming is enabled for the current tenant
    • distribute

      org.opencastproject.job.api.Job distribute(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, Set<String> elementIds) throws DistributionException, org.opencastproject.mediapackage.MediaPackageException
      Throws:
      DistributionException
      org.opencastproject.mediapackage.MediaPackageException
    • retract

      org.opencastproject.job.api.Job retract(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, Set<String> elementIds) throws DistributionException
      Throws:
      DistributionException
    • distributeSync

      List<org.opencastproject.mediapackage.MediaPackageElement> distributeSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, Set<String> elementIds) throws DistributionException
      Distributes the given elements synchronously. This should be used rarely since load balancing will be unavailable. However, since the dispatching logic is bypassed, synchronous execution is much faster. It is useful in interactive scenarios where you synchronously wait for job execution anyway and you don't want to make the user waiting for too long.
      Parameters:
      channelId - The channel to retract from.
      mediapackage - A media package holding the elements to retract.
      elementIds - The IDs of the elements to retract.
      Returns:
      The distributed elements.
      Throws:
      DistributionException - In case distribution fails.
    • retractSync

      List<org.opencastproject.mediapackage.MediaPackageElement> retractSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, Set<String> elementIds) throws DistributionException
      Retracts the given elements synchronously. This should be used rarely since load balancing will be unavailable. However, since the dispatching logic is bypassed, synchronous execution is much faster. It is useful in interactive scenarios where you synchronously wait for job execution anyway and you don't want to make the user waiting for too long.
      Parameters:
      channelId - The channel to retract from.
      mediaPackage - A media package holding the elements to retract.
      elementIds - The IDs of the elements to retract.
      Returns:
      The retracted elements.
      Throws:
      DistributionException - In case retraction fails.