
javax.tv.service.selection.PresentationTerminatedEvent Maven / Gradle / Ivy
/*
* @(#)PresentationTerminatedEvent.java 1.14 00/08/28
*
* Copyright 1998-2000 by Sun Microsystems, Inc.,
* 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Sun Microsystems, Inc. ("Confidential Information"). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Sun.
*/
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.
*
* 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 SelectionFailedEvent */
public class PresentationTerminatedEvent extends ServiceContextEvent
{
/**
* Reason code : The service vanished from the network.
*/
public final static int SERVICE_VANISHED = 1;
/**
* Reason code : Tuning made the service unavailable.
*/
public final static int TUNED_AWAY = 2;
/**
* Reason code : Resources needed to present the service have been removed.
*/
public final static 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 final static int ACCESS_WITHDRAWN = 4;
/**
* Reason code : The user requested that the presentation be stopped.
*/
public final static int USER_STOP = 5;
/**
* 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(null);
}
/**
* Reports the reason for which the presentation was terminated.
*
* @return A reason code for why the presentation was terminated.
*/
public int getReason()
{
return 0;
}
}