org.ocap.shared.dvr
Class LocatorRecordingSpec

java.lang.Object
  extended by org.ocap.shared.dvr.RecordingSpec
      extended by org.ocap.shared.dvr.LocatorRecordingSpec

public class LocatorRecordingSpec
extends RecordingSpec

Specifies a recording request in terms of one or more Locators.

If multiple locators are contained within the source, all of them MUST be part of the same service.

When instances of this class are passed to RecordingManager.record(..), the following additional failure mode shall apply - if the end time (computed as the start time + the duration) is in the past when the record method is called, the record method shall throw an IllegalArgumentException.

When an instance of this recording spec is passed in as a parameter to the RecordingRequest.reschedule(..) method, an IllegalArgumentException shall be thrown if either of the following apply;

When instances of this class are passed to RecordingManager.record(..), if the start time is in the past and either

then the current time shall be used as the start time and the duration reduced accordingly. The present document does not require implementations to include already recorded content in scheduled recordings however GEM recording specifications may require this.


Constructor Summary
LocatorRecordingSpec(javax.tv.locator.Locator[] source, java.util.Date startTime, long duration, RecordingProperties properties)
          Constructor
 
Method Summary
 long getDuration()
          Returns the duration passed as an argument to the constructor.
 javax.tv.locator.Locator[] getSource()
          Returns the source of the recording
 java.util.Date getStartTime()
          Returns the start time passed as an argument to the constructor.
 
Methods inherited from class org.ocap.shared.dvr.RecordingSpec
getProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocatorRecordingSpec

public LocatorRecordingSpec(javax.tv.locator.Locator[] source,
                            java.util.Date startTime,
                            long duration,
                            RecordingProperties properties)
                     throws javax.tv.service.selection.InvalidServiceComponentException
Constructor

Parameters:
source - Source of streams to be recorded. Implementations shall make a copy of this array before the constructor returns.
startTime - Start time of the recording. Changes to this parameter after the constructor returns shall have no effect on the actual start time of the recording.
duration - Length of time to record in milli-seconds
properties - the definition of how the recording is to be done
Throws:
javax.tv.service.selection.InvalidServiceComponentException - if all of the locators in the source parameter are not all in the same service.
java.lang.IllegalArgumentException - if duration is negative.
Method Detail

getSource

public javax.tv.locator.Locator[] getSource()
Returns the source of the recording

Returns:
a copy of the source passed into the constructor

getStartTime

public java.util.Date getStartTime()
Returns the start time passed as an argument to the constructor.

Returns:
a copy of the start time passed into the constructor

getDuration

public long getDuration()
Returns the duration passed as an argument to the constructor.

Returns:
the duration passed into the constructor