Java TV(tm) API 1.0

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:
java.io.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:

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 previously 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.
 
Fields inherited from class java.util.EventObject
source
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SERVICE_VANISHED

public static final int SERVICE_VANISHED = 1
Reason code : The service vanished from the network.

TUNED_AWAY

public static final int TUNED_AWAY = 2
Reason code : Tuning made the service unavailable.

RESOURCES_REMOVED

public static final int RESOURCES_REMOVED = 3
Reason code : Resources needed to present the service have been removed.

ACCESS_WITHDRAWN

public static final int ACCESS_WITHDRAWN = 4
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.

USER_STOP

public static final int USER_STOP = 5
Reason code : The user requested that the presentation be stopped.
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.

Java TV(tm) API 1.0

Copyright © 1998 - 2000 Sun Microsystems, Inc.