Java DTV API 1.3
18-Nov-2009

com.sun.dtv.broadcast
Interface BroadcastFileListener

All Superinterfaces:
EventListener

public interface BroadcastFileListener
extends EventListener

The BroadcastFileListener interface is implemented by application classes which require notification of changes to BroadcastFile data.


Method Summary
 void broadcastFileChanged(BroadcastFileEvent event)
          Notifies the BroadcastFileListener that the BroadcastFile has changed in the broadcast.
 void broadcastFileLost(BroadcastFileEvent event)
          Notifies the BroadcastFileListener that the BroadcastFile has been lost from the broadcast.
 

Method Detail

broadcastFileChanged

void broadcastFileChanged(BroadcastFileEvent event)
Notifies the BroadcastFileListener that the BroadcastFile has changed in the broadcast. If the contents of a BroadcastFile change while an application is reading its data from the local cache, the cached data shall either (a) remain entirely unchanged or (b) be flushed from the cache. If the data is flushed from the cache, attempts to read from this BroadcastFile using pre-existing file reading objects (e.g. FileInputStream, FileReader, or RandomAccessFile) will fail.

To read the new data, the application must create a new file reading object. To ensure that this data is the most recent version from the broadcast, the application should first invoke the BroadcastFile.refreshCache() method.

No guarantees are provided concerning the ability of the receiver to detect changes to the broadcast BroadcastFile or the latency of event notification if a change is detected.

Parameters:
event - Event indicating BroadcastFile that has changed.
See Also:
BroadcastFile.refreshCache()

broadcastFileLost

void broadcastFileLost(BroadcastFileEvent event)
Notifies the BroadcastFileListener that the BroadcastFile has been lost from the broadcast. Reason for losing BroadcastFile from the broadcast could be selection of another service, transmission errors, discontinuation of the broadcast or others. If the contents of a BroadcastFile is lost while an application is reading its data from the local cache, the cached data shall either (a) remain available or (b) be cleared from the cache. If the data is cleared from the cache, attempts to read from this BroadcastFile using pre-existing file reading objects (e.g. FileInputStream, FileReader, or RandomAccessFile) will fail. Creation of new file reading object MUST also fail. To ensure information about file availability is the most recent from the broadcast, the application should first invoke the BroadcastFile.refreshCache() method on the parent directory.

No guarantees are provided concerning the ability of the receiver to detect changes to the broadcast BroadcastFile or the latency of event notification if a lost is detected.

Parameters:
event - Event indicating BroadcastFile that has changed.
See Also:
BroadcastFile.refreshCache()

Java DTV API 1.3
18-Nov-2009

Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.