|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.dtv.broadcast.event.BroadcastEventManager
public class BroadcastEventManager
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 |
---|
public BroadcastEventManager(Locator locator) throws InvalidLocatorException, IOException
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.
locator
- A Locator
referencing the source of the
BroadcastEvent
.
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.public BroadcastEventManager(String url) throws IOException
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.
url
- The stream path name.
IOException
- If the requested broadcast events cannot be
accessed.
UnsupportedOperationException
- If broadcast filesystem is not supported.Method Detail |
---|
public void addListener(BroadcastEventListener listener) throws IOException, SecurityException
BroadcastEventListener
to receive
notifications of received BroadcastReceivedEvent
. If
the specified listener is currently subscribed then no action is
performed.
listener
- The BroadcastEventListener
to be
notified.
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.removeListener(com.sun.dtv.broadcast.event.BroadcastEventListener)
public void removeListener(BroadcastEventListener listener)
BroadcastEventListener
from receiving
notifications of received BroadcastEvent
. If
the given BroadcastFileListener
is not currently
subscribed for notification then no action is performed.
listener
- A currently registered
BroadcastEventListener
.addListener(com.sun.dtv.broadcast.event.BroadcastEventListener)
public Locator getLocator()
Locator
identifying this
BroadcastEvent
.
Locator
identifying this
BroadcastEvent
.
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |