PresentationTerminatedEvent

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

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

## javax.tv.service.selection
Class PresentationTerminatedEvent

    java.lang.Object
      java.util.EventObject
          javax.tv.service.selection.ServiceContextEvent
              javax.tv.service.selection.PresentationTerminatedEvent

All Implemented Interfaces:
  Serializable

    public class PresentationTerminatedEvent

extends ServiceContextEvent

`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.

Once this event has been generated, a `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 presviously associated with the `ServiceContext` will have ceased presentation of their content.

See Also:
  `SelectionFailedEvent`, Serialized Form

Field Summary
`static int` | `ACCESS_WITHDRAWN` Reason code : Access to the service or some component of it has been withdrawn by the system.
`static int` | `RESOURCES_REMOVED` Reason code : Resources needed to present the service have been removed.
`static int` | `SERVICE_VANISHED` Reason code : The service vanished from the network.
`static int` | `TUNED_AWAY` Reason code : Tuning made the service unavailable.
`static int` | `USER_STOP` Reason code : The user requested that the presentation be stopped.

Constructor Summary
`PresentationTerminatedEvent(ServiceContext source, int reason)` Constructs the event with a reason code.

Method Summary
`int` | `getReason()` Reports the reason for which the presentation was terminated.

Methods inherited from class javax.tv.service.selection.ServiceContextEvent
`getServiceContext`

Methods inherited from class java.util.EventObject
`getSource, toString`

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

Field Detail

### SERVICE_VANISHED

    public static final int SERVICE_VANISHED

  Reason code : The service vanished from the network.

  See Also:
    Constant Field Values

### TUNED_AWAY

    public static final int TUNED_AWAY

  Reason code : Tuning made the service unavailable.

  See Also:
    Constant Field Values

### RESOURCES_REMOVED

    public static final int RESOURCES_REMOVED

  Reason code : Resources needed to present the service have been removed.

  See Also:
    Constant Field Values

### ACCESS_WITHDRAWN

    public static final int ACCESS_WITHDRAWN

  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.

  See Also:
    Constant Field Values

### USER_STOP

    public static final int USER_STOP

  Reason code : The user requested that the presentation be stopped.

  See Also:
    Constant Field Values

Constructor Detail

### PresentationTerminatedEvent

    public PresentationTerminatedEvent(ServiceContext source,
                                       int reason)

  Constructs the event with a reason code.

  Parameters:
    `source` - The `ServiceContext` that generated the event.
    `reason` - The reason for which the presentation was terminated.

Method Detail

### getReason

    public int getReason()

  Reports the reason for which the presentation was terminated.

  Returns:
    A reason code for why the presentation was terminated.

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

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