NotAuthorizedMediaException

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.davic.media
Class NotAuthorizedMediaException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.io.IOException
                  org.davic.media.NotAuthorizedException
                      org.davic.media.NotAuthorizedMediaException

All Implemented Interfaces:
  Serializable, NotAuthorizedInterface

    public class NotAuthorizedMediaException

extends NotAuthorizedException
implements NotAuthorizedInterface

This exception indicates that the source can not be accessed in order to reference the new content, the source has not been accepted.

See Also:
  Serialized Form

Field Summary

Fields inherited from interface org.davic.mpeg.NotAuthorizedInterface
`COMMERCIAL_DIALOG, ELEMENTARY_STREAM, FREE_PREVIEW_DIALOG, GEOGRAPHICAL_BLACKOUT, MATURITY_RATING, MATURITY_RATING_DIALOG, NO_ENTITLEMENT, NOT_POSSIBLE, OTHER, POSSIBLE_UNDER_CONDITIONS, SERVICE, TECHNICAL, TECHNICAL_DIALOG`

Constructor Summary
`NotAuthorizedMediaException(ElementaryStream[] e, int[] reason)` Constructor for exception due to failure accessing one or more MPEG elementary streams The caller of this constructor is responsible for ensuring the two arrays provided as parameters are the same size.
`NotAuthorizedMediaException(ElementaryStream[] e, int[] major_reason, int[] minor_reason)` Constructor for exception due to failure accessing one or more MPEG elementary streams The caller of this constructor is responsible for ensuring the three arrays provided as parameters are the same size.
`NotAuthorizedMediaException(Service s, int reason)` Constructor for exception due to failure accessing an MPEG service
`NotAuthorizedMediaException(Service s, int major_reason, int minor_reason)` Constructor for exception due to failure accessing an MPEG service

Method Summary
`ElementaryStream[]` | `getElementaryStreams()` If getType() returns ELEMENTARY_STREAM, then this method returns the set of ElementaryStreams that could not be descrambled.
`int[]` | `getReason(int index)` Returns the reason(s) why descrambling was not possible.
`Service` | `getService()` If getType() returns SERVICE, then this method returns the Service that could not be descrambled.
`int` | `getType()`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

Constructor Detail

### NotAuthorizedMediaException

    public NotAuthorizedMediaException(Service s,
                                       int reason)

  Constructor for exception due to failure accessing an MPEG service

  Parameters:
    `s` - the service which could not be accessed
    `reason` - the reason why the service could not be accessed

### NotAuthorizedMediaException

    public NotAuthorizedMediaException(ElementaryStream[] e,
                                       int[] reason)

  Constructor for exception due to failure accessing one or more MPEG elementary streams The caller of this constructor is responsible for ensuring the two arrays provided as parameters are the same size. The implementation is not expected to check this.

  Use of the constructor NotAuthorizedMediaException(ElementaryStream[] e, int[] reason) will result in the major reason for each elementary stream being the one specified in the reason parameter to the method and the minor reason being OTHER as defined in NotAuthorizedInterface.

  Parameters:
    `e` - the elementary streams which could not be accessed
    `reason` - the reason why the exception was thrown for each elementary stream

### NotAuthorizedMediaException

    public NotAuthorizedMediaException(ElementaryStream[] e,
                                       int[] major_reason,
                                       int[] minor_reason)

  Constructor for exception due to failure accessing one or more MPEG elementary streams The caller of this constructor is responsible for ensuring the three arrays provided as parameters are the same size. The implementation is not expected to check this.

  Parameters:
    `e` - the elementary streams which could not be accessed
    `major_reason` - the major reason why the exception was thrown for each elementary stream
    `minor_reason` - the minor reason why the exception was thrown for each elementary stream

### NotAuthorizedMediaException

    public NotAuthorizedMediaException(Service s,
                                       int major_reason,
                                       int minor_reason)

  Constructor for exception due to failure accessing an MPEG service

  Parameters:
    `s` - the service which could not be accessed
    `major_reason` - the major reason why the service could not be accessed
    `minor_reason` - the minor reason why the service could not be accessed
  Since:
    MHP 1.0.2

Method Detail

### getType

    public int getType()

  Specified by:
    `getType` in interface `NotAuthorizedInterface`
  Returns:
    SERVICE or ELEMENTARY_STREAM to indicate that either a service (MPEG program) or one or more elementary streams could not be descrambled. Implements method from org.davic.mpeg.NotAuthorizedInterface.

### getService

    public Service getService()

  If getType() returns SERVICE, then this method returns the Service that could not be descrambled. Otherwise it returns null. Implements method from org.davic.mpeg.NotAuthorizedInterface.

  Specified by:
    `getService` in interface `NotAuthorizedInterface`
  Returns:
    either the Service that could not be descrambled or null

### getElementaryStreams

    public ElementaryStream[] getElementaryStreams()

  If getType() returns ELEMENTARY_STREAM, then this method returns the set of ElementaryStreams that could not be descrambled. Otherwise it returns null. Implements method from org.davic.mpeg.NotAuthorizedInterface.

  Specified by:
    `getElementaryStreams` in interface `NotAuthorizedInterface`
  Returns:
    either the set of ElementaryStreams that could not be descrambled or null

### getReason

    public int[] getReason(int index)
                    throws IndexOutOfBoundsException

  Returns the reason(s) why descrambling was not possible. Implements method from org.davic.mpeg.NotAuthorizedInterface.

  Specified by:
    `getReason` in interface `NotAuthorizedInterface`
  Parameters:
    `index` - If the component to which access failed is a Service, index shall be 0. Otherwise index shall refer to one stream in the set returnedby getElementaryStreams().
  Returns:
    an array of length 2 where the first element of the array is the major reason and the second element of the array is the minor reason.
  Throws:
    `IndexOutOfBoundsException` - If the component to which access failed is a Service, this exception will be thrown if index is non zero. If the component(s) to which access failed was a (set of) elementary streams then this exception will be thrown where index is beyond the size of the array returned by getElementaryStreams.
  See Also:
    `NotAuthorizedInterface.getElementaryStreams()`

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

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