org.ocap.shared.dvr
Class ServiceContextRecordingSpec

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

public class ServiceContextRecordingSpec
extends RecordingSpec

Specifies a recording request in terms of what is being presented on a ServiceContext. The streams that are being presented in the indicated ServiceContext parameter are recorded. If the Service being recorded from is tuned away, recording SHALL be terminated. If the startTime is in the past and the source javax.tv.service.selection.ServiceContext is associated with a time shift buffer, the contents of the time-shift buffer may be immediately stored to the destination beginning at the startTime, if possible, up to the live broadcast point. If the time-shift buffer does not contain the source from the startTime, as much of the source may be recorded as possible. If the startTime is in the past, but a time-shift buffer cannot be associated with the recording, the recording begins from the live broadcast point. From there the contents of the live broadcast are recorded until the remaining duration is satisified.

When instances of this class are passed to RecordingManager.record(..), the following additional failure modes shall apply;

When an instance of this recording spec is passed in as a parameter to the RecordingRequest.reschedule(..) method, an IllegalArgumentException is thrown if the service context parameter is different from the service context specified in the current recording spec for the recording request.


Constructor Summary
ServiceContextRecordingSpec(javax.tv.service.selection.ServiceContext serviceContext, 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.service.selection.ServiceContext getServiceContext()
          Returns the ServiceContext to record from
 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

ServiceContextRecordingSpec

public ServiceContextRecordingSpec(javax.tv.service.selection.ServiceContext serviceContext,
                                   java.util.Date startTime,
                                   long duration,
                                   RecordingProperties properties)
                            throws java.lang.IllegalArgumentException
Constructor

Parameters:
serviceContext - The ServiceContext to record from.
startTime - Start time of the recording. If the start time is in the future when the RecordingManager.record(..) method is called with this ServiceContextRecordingSpec as an argument the record method will throw an IllegalArgumentException. 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:
java.lang.IllegalArgumentException - if duration is negative
Method Detail

getServiceContext

public javax.tv.service.selection.ServiceContext getServiceContext()
Returns the ServiceContext to record from

Returns:
the ServiceContext instance 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