Class WowzaStreamingDistributionService

java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.distribution.api.AbstractDistributionService
org.opencastproject.distribution.streaming.wowza.WowzaStreamingDistributionService
All Implemented Interfaces:
org.opencastproject.distribution.api.DistributionService, org.opencastproject.distribution.api.StreamingDistributionService, org.opencastproject.job.api.JobProducer

public class WowzaStreamingDistributionService extends org.opencastproject.distribution.api.AbstractDistributionService implements org.opencastproject.distribution.api.StreamingDistributionService
Distributes media to the local media delivery directory.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final float
    The load on the system introduced by creating a distribute job
    static final float
    The load on the system introduced by creating a retract job
    protected static final String
    Default scheme
    static final String
    The key to look for in the service configuration file to override the DEFAULT_DISTRIBUTE_JOB_LOAD
    static final String
    Receipt type
    static final String
    The key to look for in the service configuration file to override the DEFAULT_RETRACT_JOB_LOAD
    protected static final String
    The key in the properties file that specifies in which order the videos in the SMIL file should be stored
    protected static final String
    The key in the properties file that defines the streaming directory.
    protected Map<String,URI>
     
    protected static final String
    The key in the properties file that defines the streaming formats to distribute.
    protected static final String
    The tenant specific key in the properties file that defines the wowza port.
    protected static final String
    The tenant-specific key in the properties file that defines the wowza url.

    Fields inherited from class org.opencastproject.distribution.api.AbstractDistributionService

    distributionChannel, organizationDirectoryService, securityService, serviceRegistry, serviceUrl, trustedHttpClient, userDirectoryService, workspace

    Fields inherited from class org.opencastproject.job.api.AbstractJobProducer

    ACCEPT_JOB_LOADS_EXCEEDING_PROPERTY, acceptJobLoadsExeedingMaxLoad, DEFAULT_ACCEPT_JOB_LOADS_EXCEEDING, executor, jobType

    Fields inherited from interface org.opencastproject.distribution.api.DistributionService

    CONFIG_KEY_STORE_TYPE, JOB_TYPE_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of the streaming distribution service.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.framework.BundleContext bundleContext, Map<String,Object> properties)
     
    org.opencastproject.job.api.Job
    distribute(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, String elementId)
    org.opencastproject.job.api.Job
    distribute(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, Set<String> elementIds)
    List<org.opencastproject.mediapackage.MediaPackageElement>
    distributeSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, String elementId)
     
    List<org.opencastproject.mediapackage.MediaPackageElement>
    distributeSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, Set<String> elementIds)
     
     
     
    void
    modified(org.osgi.framework.BundleContext bundleContext, Map<String,Object> properties)
     
    protected String
    process(org.opencastproject.job.api.Job job)
    boolean
     
    org.opencastproject.job.api.Job
    retract(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, String elementId)
    org.opencastproject.job.api.Job
    retract(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, Set<String> elementIds)
    List<org.opencastproject.mediapackage.MediaPackageElement>
    retractSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, String elementId)
     
    List<org.opencastproject.mediapackage.MediaPackageElement>
    retractSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, Set<String> elementIds)
     
    void
    setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectoryService)
     
    void
    setSecurityService(org.opencastproject.security.api.SecurityService securityService)
     
    void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
     
    void
    setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService)
     
    void
    setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
     

    Methods inherited from class org.opencastproject.distribution.api.AbstractDistributionService

    getOrganizationDirectoryService, getSecurityService, getServiceRegistry, getTrustedHttpClient, getUserDirectoryService, setTrustedHttpClient

    Methods inherited from class org.opencastproject.job.api.AbstractJobProducer

    acceptJob, activate, countJobs, finallyUpdateJob, getJobType, incident, isReadyToAccept, isReadyToAcceptJobs

    Methods inherited from class java.lang.Object

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

    • STREAMING_DIRECTORY_KEY

      protected static final String STREAMING_DIRECTORY_KEY
      The key in the properties file that defines the streaming directory.
      See Also:
    • WOWZA_FORMATS_KEY

      protected static final String WOWZA_FORMATS_KEY
      The key in the properties file that defines the streaming formats to distribute.
      See Also:
    • WOWZA_URL_KEY

      protected static final String WOWZA_URL_KEY
      The tenant-specific key in the properties file that defines the wowza url.
      See Also:
    • WOWZA_PORT_KEY

      protected static final String WOWZA_PORT_KEY
      The tenant specific key in the properties file that defines the wowza port.
      See Also:
    • streamingUrls

      protected Map<String,URI> streamingUrls
    • SMIL_ORDER_KEY

      protected static final String SMIL_ORDER_KEY
      The key in the properties file that specifies in which order the videos in the SMIL file should be stored
      See Also:
    • DEFAULT_SCHEME

      protected static final String DEFAULT_SCHEME
      Default scheme
      See Also:
    • JOB_TYPE

      public static final String JOB_TYPE
      Receipt type
      See Also:
    • DEFAULT_DISTRIBUTE_JOB_LOAD

      public static final float DEFAULT_DISTRIBUTE_JOB_LOAD
      The load on the system introduced by creating a distribute job
      See Also:
    • DEFAULT_RETRACT_JOB_LOAD

      public static final float DEFAULT_RETRACT_JOB_LOAD
      The load on the system introduced by creating a retract job
      See Also:
    • DISTRIBUTE_JOB_LOAD_KEY

      public static final String DISTRIBUTE_JOB_LOAD_KEY
      The key to look for in the service configuration file to override the DEFAULT_DISTRIBUTE_JOB_LOAD
      See Also:
    • RETRACT_JOB_LOAD_KEY

      public static final String RETRACT_JOB_LOAD_KEY
      The key to look for in the service configuration file to override the DEFAULT_RETRACT_JOB_LOAD
      See Also:
  • Constructor Details

    • WowzaStreamingDistributionService

      public WowzaStreamingDistributionService()
      Creates a new instance of the streaming distribution service.
  • Method Details

    • getDistributionType

      public String getDistributionType()
      Specified by:
      getDistributionType in interface org.opencastproject.distribution.api.DistributionService
    • activate

      public void activate(org.osgi.framework.BundleContext bundleContext, Map<String,Object> properties) throws org.osgi.service.component.ComponentException, org.osgi.service.cm.ConfigurationException
      Throws:
      org.osgi.service.component.ComponentException
      org.osgi.service.cm.ConfigurationException
    • modified

      public void modified(org.osgi.framework.BundleContext bundleContext, Map<String,Object> properties) throws org.osgi.service.component.ComponentException, org.osgi.service.cm.ConfigurationException
      Throws:
      org.osgi.service.component.ComponentException
      org.osgi.service.cm.ConfigurationException
    • publishToStreaming

      public boolean publishToStreaming()
      Specified by:
      publishToStreaming in interface org.opencastproject.distribution.api.StreamingDistributionService
    • distribute

      public org.opencastproject.job.api.Job distribute(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, Set<String> elementIds) throws org.opencastproject.distribution.api.DistributionException
      Specified by:
      distribute in interface org.opencastproject.distribution.api.StreamingDistributionService
      Throws:
      org.opencastproject.distribution.api.DistributionException
      See Also:
      • StreamingDistributionService.distribute(java.lang.String, org.opencastproject.mediapackage.MediaPackage, java.util.Set)
    • distribute

      public org.opencastproject.job.api.Job distribute(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, String elementId) throws org.opencastproject.distribution.api.DistributionException
      Specified by:
      distribute in interface org.opencastproject.distribution.api.DistributionService
      Throws:
      org.opencastproject.distribution.api.DistributionException
      See Also:
      • DistributionService.distribute(String, org.opencastproject.mediapackage.MediaPackage, String)
    • retract

      public org.opencastproject.job.api.Job retract(String channelId, org.opencastproject.mediapackage.MediaPackage mediapackage, String elementId) throws org.opencastproject.distribution.api.DistributionException
      Specified by:
      retract in interface org.opencastproject.distribution.api.DistributionService
      Throws:
      org.opencastproject.distribution.api.DistributionException
      See Also:
      • java.lang.String)
    • retract

      public org.opencastproject.job.api.Job retract(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, Set<String> elementIds) throws org.opencastproject.distribution.api.DistributionException
      Specified by:
      retract in interface org.opencastproject.distribution.api.StreamingDistributionService
      Throws:
      org.opencastproject.distribution.api.DistributionException
      See Also:
      • StreamingDistributionService.retract(java.lang.String, org.opencastproject.mediapackage.MediaPackage, java.util.Set)
    • distributeSync

      public List<org.opencastproject.mediapackage.MediaPackageElement> distributeSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, String elementId) throws org.opencastproject.distribution.api.DistributionException
      Specified by:
      distributeSync in interface org.opencastproject.distribution.api.DistributionService
      Throws:
      org.opencastproject.distribution.api.DistributionException
    • distributeSync

      public List<org.opencastproject.mediapackage.MediaPackageElement> distributeSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, Set<String> elementIds) throws org.opencastproject.distribution.api.DistributionException
      Specified by:
      distributeSync in interface org.opencastproject.distribution.api.StreamingDistributionService
      Throws:
      org.opencastproject.distribution.api.DistributionException
    • retractSync

      public List<org.opencastproject.mediapackage.MediaPackageElement> retractSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, String elementId) throws org.opencastproject.distribution.api.DistributionException
      Specified by:
      retractSync in interface org.opencastproject.distribution.api.DistributionService
      Throws:
      org.opencastproject.distribution.api.DistributionException
    • retractSync

      public List<org.opencastproject.mediapackage.MediaPackageElement> retractSync(String channelId, org.opencastproject.mediapackage.MediaPackage mediaPackage, Set<String> elementIds) throws org.opencastproject.distribution.api.DistributionException
      Specified by:
      retractSync in interface org.opencastproject.distribution.api.StreamingDistributionService
      Throws:
      org.opencastproject.distribution.api.DistributionException
    • process

      protected String process(org.opencastproject.job.api.Job job) throws Exception
      Specified by:
      process in class org.opencastproject.job.api.AbstractJobProducer
      Throws:
      Exception
      See Also:
      • AbstractJobProducer.process(org.opencastproject.job.api.Job)
    • getDistributionDirectory

      public File getDistributionDirectory()
    • setWorkspace

      public void setWorkspace(org.opencastproject.workspace.api.Workspace workspace)
      Overrides:
      setWorkspace in class org.opencastproject.distribution.api.AbstractDistributionService
    • setServiceRegistry

      public void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
      Overrides:
      setServiceRegistry in class org.opencastproject.distribution.api.AbstractDistributionService
    • setSecurityService

      public void setSecurityService(org.opencastproject.security.api.SecurityService securityService)
      Overrides:
      setSecurityService in class org.opencastproject.distribution.api.AbstractDistributionService
    • setUserDirectoryService

      public void setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService)
      Overrides:
      setUserDirectoryService in class org.opencastproject.distribution.api.AbstractDistributionService
    • setOrganizationDirectoryService

      public void setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectoryService)
      Overrides:
      setOrganizationDirectoryService in class org.opencastproject.distribution.api.AbstractDistributionService