BlockedService

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

    java.lang.Object
      org.ocap.media.BlockedService

    public class BlockedService

extends Object

This class represents a service that is blocked from a start time for a specific duration. Whenever a `Service` or `ServiceComponent` from a service that is blocked are selected for new or changed presentation in a service context or a discrete player, the implementation SHALL block the corresponding presentation. When any service components in a blocked service are selected in a service context or discrete player they are blocked.

A blocked service is associated with an application specific level. This blocking level is not associated with a specific content rating system, but MAY be used by a `MediaAccessHandler` to set up different levels of blocking.

Constructor Summary
`BlockedService(Date startTime, long duration, Service service, boolean askMediaAccessHandler, int level)` Constructor.

Method Summary
`long` | `getDuration()` Gets the duration to block the service.
`int` | `getLevel()` Gets the level of blocking.
`Service` | `getService()` Gets the blocked `Service`.
`Date` | `getStartTime()` Gets the wall clock start time to begin service blocking.
`boolean` | `isAskMediaAccessHandler()` Gets the action when a service is blocked.

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

Constructor Detail

### BlockedService

    public BlockedService(Date startTime,
                          long duration,
                          Service service,
                          boolean askMediaAccessHandler,
                          int level)

  Constructor.

  Parameters:
    `startTime` - Wall clock time to start blocking the service.
    `duration` - Amount of time in milli-seconds to block the service.
    `service` - Service to block.
    `askMediaAccessHandler` - When true the implementation SHALL call a registered `MediaAccessHandler.checkMediaAccessAuthorization` method.
    `level` - The blocking level.
  Throws:
    `IllegalArgumentException` - if the duration is less than or equal to zero.

Method Detail

### getStartTime

    public Date getStartTime()

  Gets the wall clock start time to begin service blocking.

  Returns:
    Blocked service start time.

### getDuration

    public long getDuration()

  Gets the duration to block the service.

  Returns:
    The duration in milli-seconds to block the service.

### getService

    public Service getService()

  Gets the blocked `Service`.

  Returns:
    The service to be blocked.

### isAskMediaAccessHandler

    public boolean isAskMediaAccessHandler()

  Gets the action when a service is blocked.

  Returns:
    True when a registered ``MediaAccessHandler.checkMediaAccessAuthorization(boolean, org.ocap.net.OcapLocator[])`` is to be called and returns false when the service is to be blocked without calling the `MediaAccessHandler`

### getLevel

    public int getLevel()

  Gets the level of blocking.

  Returns:
    The blocking level.

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

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