Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR-927 (Maintenance Release)

javax.tv.service.selection
Class PresentationTerminatedEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byjavax.tv.service.selection.ServiceContextEvent
          extended byjavax.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.

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 code PresentationTerminatedEvent reason code
CA_REFUSAL ACCESS_WITHDRAWN
CONTENT_NOT_FOUND SERVICE_VANISHED
INSUFFICIENT_RESOURCES RESOURCES_REMOVED
MISSING_HANDLER RESOURCES_REMOVED
TUNING_FAILURE TUNED_AWAY
OTHER OTHER

(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 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 OTHER
          Reason code: The presentation was terminated due to an unknown reason or for multiple reasons.
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 application or 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
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 application or user requested that the presentation be stopped.

See Also:
Constant Field Values

OTHER

public static final int OTHER
Reason code: The presentation was terminated due to an unknown reason or for multiple reasons.

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.

JSR-927 (Maintenance Release)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 927 specification.