MediaAccessHandler

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.media
Interface MediaAccessHandler

    public interface MediaAccessHandler

A class implementing this interface can prevent the presentation of A/V service components.

Only one instance of the class that implements this interface can be registered to ``MediaAccessHandlerRegistrar`` via the ``MediaAccessHandlerRegistrar.registerMediaAccessHandler(org.ocap.media.MediaAccessHandler)`` method. JMF calls checkMediaAccessAuthorization() before AV service components presentation.

An application which has a MonitorAppPermission("mediaAccess") may implement this interface, and may set an instance of it in ``MediaAccessHandlerRegistrar``.

Note : this handler is only responsible for the presentation of A/V service components and not for launching applications.

Method Summary
`MediaAccessAuthorization` | `checkMediaAccessAuthorization(boolean isSourceDigital, OcapLocator[] locators)` Checks if presentation of the locators parameter is acceptable.
`void` | `notifySignaledBlocking(OcapLocator[] locators)` Notifies the handler when a service is blocked based on ratings set by a call to the `MediaAccessHandlerRegistrar.setSignaledBlocking(int)` and `MediaAccessHandlerRegistrar.setNotRatedSignaledBlocking(int, boolean)` methods.

Method Detail

### checkMediaAccessAuthorization

    MediaAccessAuthorization checkMediaAccessAuthorization(boolean isSourceDigital,
                                                           OcapLocator[] locators)

  Checks if presentation of the locators parameter is acceptable. The OCAP implementation SHALL take action based on the `MediaAccessAuthorization` returned from this method.

  Parameters:
    `locators` - The locators of the content to be presented. The array MAY contain a single service locator or multiple service component locators where all the components are part of the same service.
    `isSourceDigital` - True if the source is digital, otherwise returns false.
  Returns:
    a `MediaAccessAuthorization` defined by MediaAccessHandler for the given service components.
  See Also:
    `MediaAccessAuthorization`, `AlternativeMediaPresentationReason`

### notifySignaledBlocking

    void notifySignaledBlocking(OcapLocator[] locators)

  Notifies the handler when a service is blocked based on ratings set by a call to the `MediaAccessHandlerRegistrar.setSignaledBlocking(int)` and `MediaAccessHandlerRegistrar.setNotRatedSignaledBlocking(int, boolean)` methods.

  Parameters:
    `locators` - The locators of the content to be presented. The array MAY contain a single service locator or multiple service component locators where all the components are part of the same service. The parameter SHALL represent locators equivalent to those used to select the service components.

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

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