OcapRecordingRequest

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ocap.dvr
Interface OcapRecordingRequest

All Superinterfaces:
  LeafRecordingRequest, RecordingRequest

    public interface OcapRecordingRequest

extends LeafRecordingRequest

This interface represents a LeafRecordingRequest in OCAP.

When the implementation detects a schedule conflict, it either resolves the conflict using the Application priority of the conflicting recordings, or invokes the `ResourceContentionHandler` if one is set. The resolution of the conflict by the implementation or the ResourceContentionHandler will result in some of the overlapping recordings to be pending without conflict and some to be pending with conflict.

Field Summary
`static int` | `CANCELLED_STATE` This recording request was cancelled.
`static int` | `TEST_STATE` This recording request is a test recording request.

Fields inherited from interface org.ocap.shared.dvr.LeafRecordingRequest
`COMPLETED_STATE, DELETED_STATE, FAILED_STATE, IN_PROGRESS_INCOMPLETE_STATE, IN_PROGRESS_INSUFFICIENT_SPACE_STATE, IN_PROGRESS_STATE, IN_PROGRESS_WITH_ERROR_STATE, INCOMPLETE_STATE, PENDING_NO_CONFLICT_STATE, PENDING_WITH_CONFLICT_STATE`

Method Summary
`void` | `cancel()` Cancels a pending recording request.
`RecordingList` | `getOverlappingEntries()` Gets any other RecordingRequest that overlaps with the duration of this recording request.
`long` | `getSpaceRequired()` Gets the estimated space, in bytes, required for the recording.
`boolean` | `isStorageReady()` Returns whether the destined `MediaStorageVolume` for this recording is present and ready or not.

Methods inherited from interface org.ocap.shared.dvr.LeafRecordingRequest
`getDeletionDetails, getFailedException, getService, stop`

Methods inherited from interface org.ocap.shared.dvr.RecordingRequest
`addAppData, delete, getAppData, getAppID, getId, getKeys, getParent, getRecordingSpec, getRoot, getState, isRoot, removeAppData, reschedule, setRecordingProperties`

Field Detail

### TEST_STATE

    static final int TEST_STATE

  This recording request is a test recording request. Actual recording is not initiated for recording requests in this state. RecordingRequests in this state do not transition to other states. No events are generated when a recording request is added or deleted in this state. A recording in this state is a leaf recording request. Recordings in this states are the leaf recording requests corresponding to invocation of the RecordingManager.record(..) method with the priority value in OcapRecordingProperties set to TEST_RECORDING.

  See Also:
    Constant Field Values

### CANCELLED_STATE

    static final int CANCELLED_STATE

  This recording request was cancelled. Transitioned to when the cancel method completes successfully.

  See Also:
    Constant Field Values

Method Detail

### cancel

    void cancel()
                throws IllegalStateException,
                       AccessDeniedException

  Cancels a pending recording request. The recording request will be not be deleted from the database after the successful invocation of this method. Successful completion places this recording request in the CANCELLED_STATE. Canceling a recording request may resolve one or more conflicts. In this case some pending recordings with conflicts would be changed to pending without conflicts.

  Specified by:
    `cancel` in interface `LeafRecordingRequest`
  Throws:
    `AccessDeniedException` - if the calling application is not permitted to perform this operation by RecordingRequest specific security attributes.
    `SecurityException` - if the calling application does not have RecordingPermission("cancel",..) or RecordingPermission("*",..)
    `IllegalStateException` - if the state of the recording is not in PENDING_STATE_NO_CONFLICT_STATE or PENDING_WITH_CONFLICT_STATE.

### getSpaceRequired

    long getSpaceRequired()

  Gets the estimated space, in bytes, required for the recording.

  Returns:
    Space required for the recording in bytes. This method returns zero if the recordings is in failed state.

### getOverlappingEntries

    RecordingList getOverlappingEntries()

  Gets any other RecordingRequest that overlaps with the duration of this recording request. This method will return null unless the recording request is in the PENDING_WITH_CONFLICTS_STATE, PENDING_NO_CONFLICTS_STATE, IN_PROGRESS_INSUFFICIENT_SPACE_STATE or IN_PROGRESS_STATE. The returned list will contain only overlapping recording requests for which the application has read access permission. The RecordingList returned is only a copy of the list of overlapping entries at the time of this method call. This list is not updated if there are any changes. A new call to this method will be required to get the updated list.

  Returns:
    a RecordingList

### isStorageReady

    boolean isStorageReady()

  Returns whether the destined `MediaStorageVolume` for this recording is present and ready or not. This method SHALL return `true` under the following conditions:
  - `getRecordingProperties().getDestination().getStatus() == READY`
  - `getRecordingProperties().getDestination()` returns null and a default recording volume exists for which `getStatus() == READY`
  Otherwise, `false` SHALL be returned.

  Returns:
    `true` if the explicit or an implicit destination volume is present and ready; `false` otherwise

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD