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

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

There is a newer version: 1.3.1
Show newest version
package org.ocap.media;

/**
 * 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. */ public abstract class MediaAccessHandlerRegistrar { /** * Constructor of MediaAccessHandlerRegistrar. * An application must use the {@link MediaAccessHandlerRegistrar#getInstance} * method to create an instance. */ protected MediaAccessHandlerRegistrar() { } /** * This method returns the sole instance of the * {@link MediaAccessHandlerRegistrar} class. The * {@link MediaAccessHandlerRegistrar} instance * is a singleton. * @return The {@link MediaAccessHandlerRegistrar} * instance. */ public static MediaAccessHandlerRegistrar getInstance() { return null; } /** * 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. * * @param mah The MediaAccessHandler to set. If null is set, the * MediaAccessHandler instance will be removed. * @throws SecurityException if the caller does not have * MonitorAppPermission("mediaAccess") * permission. * @see MediaAccessHandler */ public abstract void registerMediaAccessHandler(MediaAccessHandler mah); /** * 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 * {@link MediaPresentationEvaluationTrigger}. * * @param triggers Array of MediaPresentationEvaluationTriggers generated by the Monitor Application. * @throws SecurityException if the caller does not have MonitorAppPermission("mediaAccess") permission. * @throws IllegalArgumentException if one of the input triggers is "MANDATORY". * @see MediaPresentationEvaluationTrigger */ public abstract void setExternalTriggers(MediaPresentationEvaluationTrigger[] triggers); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy