Class BaseHlsTaskRunner
java.lang.Object
org.duracloud.s3task.streaminghls.BaseHlsTaskRunner
- All Implemented Interfaces:
TaskRunner
- Direct Known Subclasses:
DeleteHlsTaskRunner,DisableHlsTaskRunner,EnableHlsTaskRunner,GetHlsSignedCookiesUrlTaskRunner,GetUrlHlsTaskRunner
Provides shared capabilities to support HLS streaming
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected com.amazonaws.services.cloudfront.AmazonCloudFrontClientprotected Stringprotected Stringprotected Stringstatic final Stringstatic final Stringprotected static final intstatic final Stringstatic final Stringprotected com.amazonaws.services.s3.AmazonS3protected StorageProviderprotected S3StorageProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckThatStreamingServiceIsEnabled(String spaceId, String taskName) Determines if a streaming distribution exists for a given spaceprotected List<com.amazonaws.services.cloudfront.model.DistributionSummary>getAllExistingWebDistributions(String bucketName) Determines if a streaming distribution already exists for a given bucketprotected com.amazonaws.services.cloudfront.model.DistributionSummarygetExistingDistribution(String bucketName) Returns the first streaming web distribution associated with a given bucketabstract StringgetName()getSpaceContents(String spaceId) Get a listing of items in a spaceabstract StringperformTask(String taskParameters) protected voidUpdates the space properties to no longer include the streaming host value (if the value existed there in the first place)protected voidsetDistributionState(String distId, boolean enabled) Enables or disables an existing distributionprotected voidwait(int index)
-
Field Details
-
HLS_STREAMING_HOST_PROP
- See Also:
-
HLS_STREAMING_TYPE_PROP
- See Also:
-
S3_ORIGIN_SUFFIX
- See Also:
-
S3_ORIGIN_OAI_PREFIX
- See Also:
-
maxRetries
protected static final int maxRetries- See Also:
-
s3Provider
-
unwrappedS3Provider
-
s3Client
protected com.amazonaws.services.s3.AmazonS3 s3Client -
cfClient
protected com.amazonaws.services.cloudfront.AmazonCloudFrontClient cfClient -
cfAccountId
-
cfKeyId
-
cfKeyPath
-
dcHost
-
-
Constructor Details
-
BaseHlsTaskRunner
public BaseHlsTaskRunner()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceTaskRunner
-
performTask
- Specified by:
performTaskin interfaceTaskRunner
-
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
Enables or disables an existing distribution- Parameters:
distId- the ID of the distributionenabled- true to enable, false to disable
-
getSpaceContents
Get a listing of items in a space -
removeHlsStreamingHostFromSpaceProps
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
Determines if a streaming distribution exists for a given space- Throws:
UnsupportedTaskException- if no distribution exists
-