Class BaseHlsTaskRunner

java.lang.Object
org.duracloud.s3task.streaminghls.BaseHlsTaskRunner
All Implemented Interfaces:
TaskRunner
Direct Known Subclasses:
DeleteHlsTaskRunner, DisableHlsTaskRunner, EnableHlsTaskRunner, GetHlsSignedCookiesUrlTaskRunner, GetUrlHlsTaskRunner

public abstract class BaseHlsTaskRunner extends Object implements TaskRunner
Provides shared capabilities to support HLS streaming
  • Field Details

  • Constructor Details

    • BaseHlsTaskRunner

      public BaseHlsTaskRunner()
  • Method Details

    • getName

      public abstract String getName()
      Specified by:
      getName in interface TaskRunner
    • performTask

      public abstract String performTask(String taskParameters)
      Specified by:
      performTask in interface TaskRunner
    • getExistingDistribution

      protected com.amazonaws.services.cloudfront.model.DistributionSummary getExistingDistribution(String bucketName)
      Returns the first streaming web distribution associated with a given bucket
    • getAllExistingWebDistributions

      protected List<com.amazonaws.services.cloudfront.model.DistributionSummary> getAllExistingWebDistributions(String bucketName)
      Determines if a streaming distribution already exists for a given bucket
    • setDistributionState

      protected void setDistributionState(String distId, boolean enabled)
      Enables or disables an existing distribution
      Parameters:
      distId - the ID of the distribution
      enabled - true to enable, false to disable
    • getSpaceContents

      protected Iterator<String> getSpaceContents(String spaceId)
      Get a listing of items in a space
    • removeHlsStreamingHostFromSpaceProps

      protected void removeHlsStreamingHostFromSpaceProps(String spaceId)
      Updates the space properties to no longer include the streaming host value (if the value existed there in the first place)
    • wait

      protected void wait(int index)
    • checkThatStreamingServiceIsEnabled

      protected void checkThatStreamingServiceIsEnabled(String spaceId, String taskName)
      Determines if a streaming distribution exists for a given space
      Throws:
      UnsupportedTaskException - if no distribution exists