|
JSR-927 (Maintenance Release) | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.EventObject
javax.tv.service.selection.ServiceContextEvent
javax.tv.service.selection.PresentationTerminatedEvent
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.
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 |
public static final int SERVICE_VANISHED
public static final int TUNED_AWAY
public static final int RESOURCES_REMOVED
public static final int ACCESS_WITHDRAWN
public static final int USER_STOP
public static final int OTHER
| Constructor Detail |
public PresentationTerminatedEvent(ServiceContext source,
int reason)
source - The ServiceContext that generated the event.reason - The reason for which the presentation was terminated.| Method Detail |
public int getReason()
|
JSR-927 (Maintenance Release) | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||