BufferingRequest

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
Class BufferingRequest

    java.lang.Object
      org.ocap.dvr.BufferingRequest

    public abstract class BufferingRequest

extends Object

This class represents an application request for buffering. An application can call the `createInstance` method to create a request.

Method Summary
`static BufferingRequest` | `createInstance(Service service, long minDuration, long maxDuration, ExtendedFileAccessPermissions efap)` Creates a BufferingRequest object.
`abstract AppID` | `getAppID()` Gets the AppID of the application that created the request.
`abstract ExtendedFileAccessPermissions` | `getExtendedFileAccessPermissions()` Gets the ExtendedFileAccessPermissions for this request.
`abstract long` | `getMaxDuration()` Gets the maximum duration to buffer for this request.
`abstract long` | `getMinimumDuration()` Gets the minimum content buffering duration for this request.
`abstract Service` | `getService()` Gets the Service this request is attempting to buffer.
`abstract void` | `setExtendedFileAccessPermissions(ExtendedFileAccessPermissions efap)` Sets the ExtendedFileAccessPermissions for this request.
`abstract void` | `setMaxDuration(long duration)` Sets the maximum duration of content that MAY be buffered for this `BufferingRequest`.
`abstract void` | `setMinimumDuration(long minDuration)` Sets the minimum duration of content that SHALL be buffered for this request.
`abstract void` | `setService(Service service)` Sets the Service this request is attempting to buffer.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### createInstance

    public static BufferingRequest createInstance(Service service,
                                                  long minDuration,
                                                  long maxDuration,
                                                  ExtendedFileAccessPermissions efap)

  Creates a BufferingRequest object.

  Parameters:
    `service` - The service to buffer.
    `minDuration` - Minimum duration in seconds to buffer.
    `maxDuration` - Maximum duration in seconds to buffer.
    `efap` - Extended file access permissions for this request. If this parameter is null, no write permissions are given to this request. Read permissions for `BufferingRequest` instances are always world regardless of read permissions set by this parameter.
  Throws:
    `IllegalArgumentException` - if the service parameter is not a valid `Service`, or if `minDuration` is less than `OcapRecordingManager.getSmallestTimeShiftDuration()`, or if `maxDuration` is less than `minDuration`.

### getService

    public abstract Service getService()

  Gets the Service this request is attempting to buffer.

  Returns:
    Service being buffered for this request.

### setService

    public abstract void setService(Service service)
                             throws IllegalArgumentException

  Sets the Service this request is attempting to buffer.

  Parameters:
    `service` - The `Service` to buffer for this request.
  Throws:
    `IllegalArgumentException` - if the parameter is not a valid `Service`.
    `SecurityException` - if the calling applications does not have one of the write ExtendedFileAccessPermissions set by the `createInstance` or `setExtendedFileAccessPermissions` methods.

### getMinimumDuration

    public abstract long getMinimumDuration()

  Gets the minimum content buffering duration for this request.

  Returns:
    The minimum content buffering duration in seconds.

### setMinimumDuration

    public abstract void setMinimumDuration(long minDuration)

  Sets the minimum duration of content that SHALL be buffered for this request. If this method necessitates a buffer re-size the implementation MAY flush the contents of the buffer.

  Parameters:
    `minDuration` - Minimum duration in seconds.
  Throws:
    `IllegalArgumentException` - If the parameter is greater than the current value and Host device does not have enough space to meet the request, or if the parameter is greater than the maximum duration set by the `createInstance` or `setMaximumDuration` methods, or if the parameter is less than the duration returned by `OcapRecordingManager.getSmallestTimeShiftDuration()`.
    `SecurityException` - if the calling application does not have one of the write ExtendedFileAccessPermissions set by the `createInstance` or `setExtendedFileAccessPermissions` methods.

### getMaxDuration

    public abstract long getMaxDuration()

  Gets the maximum duration to buffer for this request. Returns the value set by the `createInstance` or `setMaximumDuration` methods.

  Returns:
    Maximum duration in seconds.

### setMaxDuration

    public abstract void setMaxDuration(long duration)

  Sets the maximum duration of content that MAY be buffered for this `BufferingRequest`. Informs the implementation that storing more content than this is not needed by the application owning this `BufferingRequest`.

  Parameters:
    `duration` - The maximum duration in seconds.
  Throws:
    `IllegalArgumentException` - if the duration parameter is negative or if the parameter is less than the minimum duration set by the `createInstance` or `setMaximumDuration` methods, or if the parameter is less than the duration returned by `OcapRecordingManager.getSmallestTimeShiftDuration()`.
    `SecurityException` - if the calling application does not have one of the write ExtendedFileAccessPermissions set by the `createInstance` or `setExtendedFileAccessPermissions` methods.

### getExtendedFileAccessPermissions

    public abstract ExtendedFileAccessPermissions getExtendedFileAccessPermissions()

  Gets the ExtendedFileAccessPermissions for this request.

  Returns:
    The ExtendedFileAccessPermissions.

### setExtendedFileAccessPermissions

    public abstract void setExtendedFileAccessPermissions(ExtendedFileAccessPermissions efap)

  Sets the ExtendedFileAccessPermissions for this request.

  Parameters:
    `efap` - The ExtendedFileAccessPermissions for this request.
  Throws:
    `IllegalArgumentException` - if the parameter is null;
    `SecurityException` - if the calling application is not the creator of this request.

### getAppID

    public abstract AppID getAppID()

  Gets the AppID of the application that created the request. If null is returned the implementation created the request.

  Returns:
    AppID of the owning application.

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

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