Java DTV API 1.3
18-Nov-2009

com.sun.dtv.broadcast.event
Class BroadcastEventManager

java.lang.Object
  extended by com.sun.dtv.broadcast.event.BroadcastEventManager

public class BroadcastEventManager
extends Object

The BroadcastEventManager class represents events obtained from broadcast file systems. An instance of BroadcastEventManager may be constructed from a Locator instance.

Events arriving on the broadcast channel will be delivered as BroadcastReceivedEvent using the BroadcastEventListener.

All constructors must use BroadcastException to throw broadcast specific exceptions. Java DTV API implementations that do not support broadcast event access will throw UnsupportedOperationException upon any attempt to construct a BroadcastEvent object.


Constructor Summary
BroadcastEventManager(Locator locator)
          Creates a BroadcastEventManager instance that represents the events referenced by the given Locator.
BroadcastEventManager(String url)
          Creates a BroadcastEventManager instance that represents the events whose path name in the broadcast is the given path argument.
 
Method Summary
 void addListener(BroadcastEventListener listener)
          Subscribes a BroadcastEventListener to receive notifications of received BroadcastReceivedEvent.
 Locator getLocator()
          Returns a Locator identifying this BroadcastEvent.
 void removeListener(BroadcastEventListener listener)
          Unsubscribes a BroadcastEventListener from receiving notifications of received BroadcastEvent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BroadcastEventManager

public BroadcastEventManager(Locator locator)
                      throws InvalidLocatorException,
                             IOException
Creates a BroadcastEventManager instance that represents the events referenced by the given Locator.

This constructor throws java.io.IOException if it determines immediately that the requested broadcast events cannot be accessed. Since this constructor may complete its work asynchronously, absence of an IOException is not a guarantee that the requested broadcast events are accessible.

Parameters:
locator - A Locator referencing the source of the BroadcastEvent.
Throws:
InvalidLocatorException - If locator does not refer to broadcast events.
IOException - If the requested broadcast events cannot be accessed.
UnsupportedOperationException - If broadcast filesystem is not supported.

BroadcastEventManager

public BroadcastEventManager(String url)
                      throws IOException
Creates a BroadcastEventManager instance that represents the events whose path name in the broadcast is the given path argument.

This constructor throws java.io.IOException if it determines immediately that the requested broadcast events cannot be accessed. Since this constructor may complete its work asynchronously, absence of an IOException is not a guarantee that the requested broadcast events are accessible.

Parameters:
url - The stream path name.
Throws:
IOException - If the requested broadcast events cannot be accessed.
UnsupportedOperationException - If broadcast filesystem is not supported.
Method Detail

addListener

public void addListener(BroadcastEventListener listener)
                 throws IOException,
                        SecurityException
Subscribes a BroadcastEventListener to receive notifications of received BroadcastReceivedEvent. If the specified listener is currently subscribed then no action is performed.

Parameters:
listener - The BroadcastEventListener to be notified.
Throws:
IOException - If there are insufficient resources to support this listener.
SecurityException - If a security manager exists and its SecurityManager.checkRead(java.lang.String) method denies read access to the file.
See Also:
removeListener(com.sun.dtv.broadcast.event.BroadcastEventListener)

removeListener

public void removeListener(BroadcastEventListener listener)
Unsubscribes a BroadcastEventListener from receiving notifications of received BroadcastEvent. If the given BroadcastFileListener is not currently subscribed for notification then no action is performed.

Parameters:
listener - A currently registered BroadcastEventListener.
See Also:
addListener(com.sun.dtv.broadcast.event.BroadcastEventListener)

getLocator

public Locator getLocator()
Returns a Locator identifying this BroadcastEvent.

Returns:
A Locator identifying this BroadcastEvent.

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.