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

javax.tv.service.selection.PresentationTerminatedEvent Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
/**

This is not an official specification document, and usage is restricted.

NOTICE


(c) 2005-2008 Sun Microsystems, Inc. All Rights Reserved.

Neither this file nor any files generated from it describe a complete specification, and they may only be used as described below.

Sun Microsystems Inc. owns the copyright in this file and it is provided to you for informative use only. For example, this file and any files generated from it may be used to generate other documentation, such as a unified set of documents of API signatures for a platform that includes technologies expressed as Java APIs. This file may also be used to produce "compilation stubs," which allow applications to be compiled and validated for such platforms. By contrast, no permission is given for you to incorporate this file, in whole or in part, in an implementation of a Java specification.

Any work generated from this file, such as unified javadocs or compiled stub files, must be accompanied by this notice in its entirety.

This work corresponds to the API signatures of JSR 927: Java TV API 1.1.1. In the event of a discrepency between this work and the JSR 927 specification, which is available at http://www.jcp.org/en/jsr/detail?id=927, the latter takes precedence. */ package javax.tv.service.selection; /** * PresentationTerminatedEvent is generated when the * presentation of a service terminates. This includes both normal * termination (e.g., due to an application calling the stop() * method) and abnormal termination (e.g., due to some change in the * environment). Examples of abnormal termination include: * *

    *
  • a tuning operation making the service unavailable
  • * *
  • removal of fundamental resources required to present the * service
  • * *
  • withdrawal of CA authorization
  • *
* * PresentationTerminatedEvent is also generated * following a SelectionFailedEvent either if the service * context was not previously in the presenting state or if * recovery of what was being presented previously is not possible. * PresentationTerminatedEvent is only generated when no * components of the requested service can be presented. *

* When a PresentationTerminatedEvent is * generated following a failed selection attempt, the * reason code of the PresentationTerminatedEvent * is derived from the reason code for the * SelectionFailedEvent which preceded it, according * to the table below. *

*

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SelectionFailedEvent reason codePresentationTerminatedEvent reason code
CA_REFUSALACCESS_WITHDRAWN
CONTENT_NOT_FOUNDSERVICE_VANISHED
INSUFFICIENT_RESOURCESRESOURCES_REMOVED
MISSING_HANDLERRESOURCES_REMOVED
TUNING_FAILURETUNED_AWAY
OTHEROTHER
*

* (No reason code corresponding to * SelectionFailedEvent.INTERRUPTED is necessary, since this * code signals that a new service selection operation is underway.) *

* Once a PresentationTerminatedEvent is generated, the * ServiceContext * will be in the not presenting state until a call to a * select() method succeeds. When this event is * generated, all resources used for the presentation have been * released, and ServiceContentHandler instances * previously associated with the ServiceContext will * have ceased presentation of their content. * * @see SelectionFailedEvent */ public class PresentationTerminatedEvent extends ServiceContextEvent { /** * Reason code : The service vanished from the network. */ public static final int SERVICE_VANISHED = 1; /** * Reason code : Tuning made the service unavailable. */ public static final int TUNED_AWAY = 2; /** * Reason code : Resources needed to present the service have been removed. */ public static final int RESOURCES_REMOVED = 3; /** * Reason code : Access to the service or some component of it has been * withdrawn by the system. An example of this is the end of a free * preview period for IPPV content. */ public static final int ACCESS_WITHDRAWN = 4; /** * Reason code : The application or user requested that the * presentation be stopped. */ public static final int USER_STOP = 5; /** * Reason code: The presentation was terminated due to an unknown reason * or for multiple reasons. */ public static final int OTHER = 255; /** * Constructs the event with a reason code. * * @param source The ServiceContext that generated the event. * @param reason The reason for which the presentation was terminated. * */ public PresentationTerminatedEvent(ServiceContext source, int reason) { super(source); } /** * Reports the reason for which the presentation was terminated. * * @return A reason code for why the presentation was terminated. */ public int getReason() { return 0; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy