All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ocap.media.MediaAccessHandlerRegistrar.html Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version






MediaAccessHandlerRegistrar














org.ocap.media
Class MediaAccessHandlerRegistrar

java.lang.Object
  extended by org.ocap.media.MediaAccessHandlerRegistrar

public abstract class MediaAccessHandlerRegistrar
extends java.lang.Object

This class allows to register a handler that can prevent the presentation of A/V service components.
This handler must be plugged in the service selection before the service components presentation.

Moreover, it allows the Monitor Application to handle some triggers. A trigger is an event that can lead to an evaluation of the presented media.


Constructor Summary
protected MediaAccessHandlerRegistrar()
          Constructor of MediaAccessHandlerRegistrar.
 
Method Summary
static MediaAccessHandlerRegistrar getInstance()
          This method returns the sole instance of the MediaAccessHandlerRegistrar class.
abstract  void registerMediaAccessHandler(MediaAccessHandler mah)
          Registers the handler that can prevent the presentation of A/V service components.
abstract  void setExternalTriggers(MediaPresentationEvaluationTrigger[] triggers)
          Defines the list of triggers that the Monitor Application wants to generate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaAccessHandlerRegistrar

protected MediaAccessHandlerRegistrar()
Constructor of MediaAccessHandlerRegistrar. An application must use the getInstance() method to create an instance.

Method Detail

getInstance

public static MediaAccessHandlerRegistrar getInstance()
This method returns the sole instance of the MediaAccessHandlerRegistrar class. The MediaAccessHandlerRegistrar instance is a singleton.

Returns:
The MediaAccessHandlerRegistrar instance.

registerMediaAccessHandler

public abstract void registerMediaAccessHandler(MediaAccessHandler mah)
Registers the handler that can prevent the presentation of A/V service components.
At most, only one instance of MediaAccessHandler can be set. Multiple calls of this method replace the previous instance by a new one.
By default, no MediaAccessHandler is set, i.e. the MediaAccessHandler.checkMediaAccessAuthorization() method is not called.

Parameters:
mah - The MediaAccessHandler to set. If null is set, the MediaAccessHandler instance will be removed.
Throws:
java.lang.SecurityException - if the caller does not have MonitorAppPermission("mediaAccess") permission.
See Also:
MediaAccessHandler

setExternalTriggers

public abstract void setExternalTriggers(MediaPresentationEvaluationTrigger[] triggers)
Defines the list of triggers that the Monitor Application wants to generate. Such triggers must be MediaPresentationEvaluationTriggers tagged as "OPTIONAL". When set, the OCAP implementation stops generating corresponding MediaPresentationEvaluationTrigger.

Parameters:
triggers - Array of MediaPresentationEvaluationTriggers generated by the Monitor Application.
Throws:
java.lang.SecurityException - if the caller does not have MonitorAppPermission("mediaAccess") permission.
java.lang.IllegalArgumentException - if one of the input triggers is "MANDATORY".
See Also:
MediaPresentationEvaluationTrigger






© 2015 - 2024 Weber Informatics LLC | Privacy Policy