Class UdpStreamMonitor

java.lang.Object
org.codice.alliance.video.stream.mpegts.UdpStreamMonitor
All Implemented Interfaces:
StreamMonitor

public class UdpStreamMonitor extends Object implements StreamMonitor
Starts a Netty server with a pipeline specified by UdpStreamProcessor. The following properties must be set:
  • Field Details

  • Constructor Details

    • UdpStreamMonitor

      public UdpStreamMonitor(org.osgi.framework.BundleContext bundleContext)
  • Method Details

    • setStreamCreationPlugin

      public void setStreamCreationPlugin(StreamCreationPlugin streamCreationPlugin)
    • setStreamShutdownPlugin

      public void setStreamShutdownPlugin(StreamShutdownPlugin streamShutdownPlugin)
    • getStartImmediately

      public Boolean getStartImmediately()
    • setStartImmediately

      public void setStartImmediately(Boolean startImmediately)
    • getDistanceTolerance

      public Double getDistanceTolerance()
    • setDistanceTolerance

      public void setDistanceTolerance(Double distanceTolerance)
    • setAdditionalProperties

      public void setAdditionalProperties(List<String> properties)
    • getNetworkInterface

      public String getNetworkInterface()
    • setNetworkInterface

      public void setNetworkInterface(String networkInterface)
      Parameters:
      networkInterface - may be null or empty/blank string
    • setParentMetacardUpdater

      public void setParentMetacardUpdater(MetacardUpdater parentMetacardUpdater)
      Parameters:
      parentMetacardUpdater - must be non-null
    • getMetacardUpdateInitialDelay

      public Long getMetacardUpdateInitialDelay()
    • setMetacardUpdateInitialDelay

      public void setMetacardUpdateInitialDelay(Long metacardUpdateInitialDelay)
      Parameters:
      metacardUpdateInitialDelay - must be non-null and >=0 and <=UdpStreamProcessor.MAX_METACARD_UPDATE_INITIAL_DELAY
    • setFilenameGenerator

      public void setFilenameGenerator(FilenameGenerator filenameGenerator)
      Parameters:
      filenameGenerator - must be non-null
    • setFilenameTemplate

      public void setFilenameTemplate(String template)
      Parameters:
      template - must be non-null and non-blank
    • getFileNameTemplate

      public String getFileNameTemplate()
    • setRolloverCondition

      public void setRolloverCondition(RolloverCondition rolloverCondition)
      Parameters:
      rolloverCondition - must be non-null
    • setUuidGenerator

      public void setUuidGenerator(org.codice.ddf.platform.util.uuidgenerator.UuidGenerator uuidGenerator)
    • init

      public void init()
      Called by osgi to initialize the monitor. Makes sure it is already shutdown before initializing. Will throw a RuntimeException if not properly initialized.
    • startMonitoring

      public void startMonitoring()
      Description copied from interface: StreamMonitor
      Starts the monitoring mechanism on the stream
      Specified by:
      startMonitoring in interface StreamMonitor
    • stopMonitoring

      public void stopMonitoring()
      Description copied from interface: StreamMonitor
      Stops the monitoring mechanism on the stream
      Specified by:
      stopMonitoring in interface StreamMonitor
    • isMonitoring

      public boolean isMonitoring()
      Specified by:
      isMonitoring in interface StreamMonitor
      Returns:
      returns true when actively monitoring stream
    • setParentTitle

      public void setParentTitle(String parentTitle)
    • getStartDateAsString

      public String getStartDateAsString()
    • setStreamId

      public void setStreamId(String streamId)
    • getStreamId

      public String getStreamId()
      Description copied from interface: StreamMonitor
      Get the string that uniquely identifies this stream.
      Specified by:
      getStreamId in interface StreamMonitor
      Returns:
      a unique identifier for this stream
    • getStreamUri

      public Optional<URI> getStreamUri()
      Description copied from interface: StreamMonitor
      Get the URI of the stream associated with this stream processor.
      Specified by:
      getStreamUri in interface StreamMonitor
      Returns:
      optional uri of the stream
    • getTitle

      public Optional<String> getTitle()
      Description copied from interface: StreamMonitor
      Get the title string to be used for the parent metacard.
      Specified by:
      getTitle in interface StreamMonitor
      Returns:
      optional title of the stream
    • setMetacardTypeList

      public void setMetacardTypeList(List<ddf.catalog.data.MetacardType> metacardTypeList)
      Parameters:
      metacardTypeList - must be non-null
    • setCatalogFramework

      public void setCatalogFramework(ddf.catalog.CatalogFramework catalogFramework)
      Parameters:
      catalogFramework - must be non-null
    • destroy

      public void destroy(int arg)
      Called by osgi to destroy the monitor.
      Parameters:
      arg - osgi destroy argument
    • setStreamEndPlugin

      public void setStreamEndPlugin(StreamEndPlugin streamEndPlugin)
      The StreamEndPlugin gets called when a stream ends by either being stopped or timed-out.
      Parameters:
      streamEndPlugin - the plugin
    • updateCallback

      public void updateCallback(Map<String,Object> properties)
      Called by osgi to update the properties defined in metatype.xml
      Parameters:
      properties - properties being updated
    • getMonitoredAddress

      public String getMonitoredAddress()
    • setMonitoredAddress

      public void setMonitoredAddress(String monitoredAddress)
      Parameters:
      monitoredAddress - must be non-null and resolvable
    • getByteCountRolloverCondition

      public Integer getByteCountRolloverCondition()
    • setMegabyteCountRolloverCondition

      public void setMegabyteCountRolloverCondition(Integer count)
      Parameters:
      count - must be non-null and positive
    • getElapsedTimeRolloverCondition

      public Long getElapsedTimeRolloverCondition()
    • setElapsedTimeRolloverCondition

      public void setElapsedTimeRolloverCondition(Long milliseconds)
      Parameters:
      milliseconds - must be non-null and >= ELAPSED_TIME_MIN