org.ocap.shared.dvr
Class RecordingManager

java.lang.Object
  extended by org.ocap.shared.dvr.RecordingManager
Direct Known Subclasses:
CRIDRecordingManager, OcapRecordingManager

public abstract class RecordingManager
extends java.lang.Object

RecordingManager represents the entity that performs recordings.


Constructor Summary
protected RecordingManager()
          Constructor for instances of this class.
 
Method Summary
abstract  void addRecordingChangedListener(RecordingChangedListener rcl)
          Adds an event listener for changes in status of recording requests.
abstract  RecordingList getEntries()
          Gets the list of entries maintained by the RecordingManager.
abstract  RecordingList getEntries(RecordingListFilter filter)
          Gets the list of recording requests matching the specified filter.
static RecordingManager getInstance()
          Gets the singleton instance of RecordingManager.
abstract  RecordingRequest getRecordingRequest(int id)
          Look up a recording request from the identifier.
abstract  RecordingRequest record(RecordingSpec source)
          Requests the recording of the stream or streams according to the source parameter.
abstract  void removeRecordingChangedListener(RecordingChangedListener rcl)
          Removes a registed event listener for changes in status of recording requests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordingManager

protected RecordingManager()
Constructor for instances of this class. This constructor is provided for the use of implementations and specifications which extend this specification. Applications shall not define sub-classes of this class. Implementations are not required to behave correctly if any such application defined sub-classes are used.

Method Detail

getEntries

public abstract RecordingList getEntries()
Gets the list of entries maintained by the RecordingManager. This list includes both parent and leaf recording requests. For applications with RecordingPermission("read", "own"), only RecordingRequests of which the calling application has visibility as defined by any RecordingRequest specific security attributes will be returned. For applications with RecordingPermission("read", "*"), all RecordingRequests will be returned.

Returns:
an instance of RecordingList
Throws:
java.lang.SecurityException - if the calling application does not have RecordingPermission("read",..) or RecordingPermission("*",..)

getEntries

public abstract RecordingList getEntries(RecordingListFilter filter)
Gets the list of recording requests matching the specified filter. For applications with RecordingPermission("read", "own"), only RecordingRequests of which the calling application has visibility as defined by any RecordingRequest specific security attributes will be returned. For applications with RecordingPermission("read", "*"), all RecordingRequests matching the specified filter will be returned.

Parameters:
filter - the filter to use on the total set of recording requests
Returns:
an instance of RecordingList
Throws:
java.lang.SecurityException - if the calling application does not have RecordingPermission("read",..) or RecordingPermission("*",..)

addRecordingChangedListener

public abstract void addRecordingChangedListener(RecordingChangedListener rcl)
Adds an event listener for changes in status of recording requests. For applications with RecordingPermission("read", "own"), the listener parameter will only be informed of changes that affect RecordingRequests of which the calling application has visibility as defined by any RecordingRequest specific security attributes. For applications with RecordingPermission("read", "*"), the listener parameter will be informed of all changes.

Parameters:
rcl - The listener to be registered.
Throws:
java.lang.SecurityException - if the calling application does not have RecordingPermission("read",..) or RecordingPermission("*",..)

removeRecordingChangedListener

public abstract void removeRecordingChangedListener(RecordingChangedListener rcl)
Removes a registed event listener for changes in status of recording requests. If the listener specified is not registered then this method has no effect.

Parameters:
rcl - the listener to be removed.

record

public abstract RecordingRequest record(RecordingSpec source)
                                 throws java.lang.IllegalArgumentException,
                                        AccessDeniedException
Requests the recording of the stream or streams according to the source parameter. The concrete sub-class of RecordingSpec may define additional semantics to be applied when instances of that sub-class are used.

Parameters:
source - specification of stream or streams to be recorded and how they are to be recorded.
Returns:
an instance of RecordingRequest that represents the added recording. The request returned is the root request of the recording.
Throws:
java.lang.IllegalArgumentException - if the source is an application defined class or as defined in the concrete sub-class of RecordingSpec for instances of that class
AccessDeniedException - only where defined in the concrete sub-class of RecordingSpec for instances of that class
java.lang.SecurityException - if the calling application does not have RecordingPermission("create",..) or RecordingPermission("*",..)

getInstance

public static RecordingManager getInstance()
Gets the singleton instance of RecordingManager.

Returns:
an instance of RecordingManager

getRecordingRequest

public abstract RecordingRequest getRecordingRequest(int id)
                                              throws java.lang.IllegalArgumentException
Look up a recording request from the identifier. Implementations of this method should be optimised considering the likely very large number of recording requests. For applications with RecordingPermission("read", "own"), only RecordingRequests of which the calling application has visibility as defined by any RecordingRequest specific security attributes will be returned.

Parameters:
id - an identifier as returned by RecordingRequest.getId
Returns:
the corresponding RecordingRequest
Throws:
java.lang.IllegalArgumentException - if there is no recording request corresponding to this identifier or if the recording request is not visible as defined by RecordingRequest specific security attributes
java.lang.SecurityException - if the calling application does not have RecordingPermission("read",..) or RecordingPermission("*",..)
See Also:
RecordingRequest.getId()