org.dvb.dsmcc
Class DSMCCStreamEvent

java.lang.Object
  extended byorg.dvb.dsmcc.DSMCCStream
      extended byorg.dvb.dsmcc.DSMCCStreamEvent

public class DSMCCStreamEvent
extends DSMCCStream

The DSMCCStreamEvent class is used to manage DSMCC StreamEvent Objects. Applications wishing to monitor changes in the list of events which are part of this stream event should use DSMCCObject.addObjectChangeEventListener on the DSMCCObject representing which describes this set of stream events. The BIOP::StreamEvent message shall be read from the network once only, before the constructor of this class returns. Hence methods which return information from that message shall not be effected by any subsequent changes to that information.

The subscribe method only verifies that the event name can be bound to an eventId but it does not require that the stream event descriptors for that event id can be received at that moment. While the event listener is registered the MHP terminal shall filter the stream event descriptors as specified in the "Monitoring stream events" clause in the main body of the specification.


Constructor Summary
DSMCCStreamEvent(DSMCCObject aDSMCCObject)
          Create a DSMCCStreamEvent from a DSMCCObject.
DSMCCStreamEvent(java.lang.String path)
          Create a DSMCCStreamEvent Object from its pathname.
DSMCCStreamEvent(java.lang.String path, java.lang.String name)
          Create a DSMCCStreamEvent from its pathname.
 
Method Summary
 java.lang.String[] getEventList()
          This function is used to get the list of the events of the DSMCCStreamEvent object.
 int subscribe(java.lang.String eventName, StreamEventListener l)
          This function is used to subscribe to an event of a DSMCC StreamEvent object.
 void unsubscribe(int eventId, StreamEventListener l)
          This function is used to cancel the subscription to an event of a DSMCCEvent object.
 void unsubscribe(java.lang.String eventName, StreamEventListener l)
          This function is used to cancel the subscription to an event of a DSMCCEvent object.
 
Methods inherited from class org.dvb.dsmcc.DSMCCStream
addNPTListener, getDuration, getNPT, getNPTRate, getStreamLocator, isAudio, isData, isMPEGProgram, isVideo, removeNPTListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSMCCStreamEvent

public DSMCCStreamEvent(DSMCCObject aDSMCCObject)
                 throws NotLoadedException,
                        IllegalObjectTypeException
Create a DSMCCStreamEvent from a DSMCCObject. The Object has to be a DSMCC StreamEvent.

Parameters:
aDSMCCObject - the DSMCC object which describes the stream.
Throws:
NotLoadedException - the DSMCCObject is not loaded.
IllegalObjectTypeException - the DSMCCObject does not lead to a DSMCC StreamEvent.

DSMCCStreamEvent

public DSMCCStreamEvent(java.lang.String path)
                 throws java.io.IOException,
                        IllegalObjectTypeException
Create a DSMCCStreamEvent Object from its pathname. The path has to lead to a DSMCCStreamEvent.

Parameters:
path - the pathname of the DSMCCStreamEvent object
Throws:
java.io.IOException - An IO error has occurred.
IllegalObjectTypeException - the path does not lead to a DSMCC StreamEvent.

DSMCCStreamEvent

public DSMCCStreamEvent(java.lang.String path,
                        java.lang.String name)
                 throws java.io.IOException,
                        IllegalObjectTypeException
Create a DSMCCStreamEvent from its pathname. For an object Carousel, this method will block until the module which contains the object is loaded. The path has to lead to a DSMCC Stream Event

Parameters:
path - the directory path.
name - the name of the DSMCCStreamEvent Object.
Throws:
java.io.IOException - If an IO error occurred.
IllegalObjectTypeException - the path does not lead to a DSMCC StreamEvent.
Method Detail

subscribe

public int subscribe(java.lang.String eventName,
                     StreamEventListener l)
              throws UnknownEventException,
                     InsufficientResourcesException
This function is used to subscribe to an event of a DSMCC StreamEvent object.

Parameters:
eventName - the name of the event.
l - an object that implements the StreamEventListener Interface.
Returns:
The event Identifier.
Throws:
UnknownEventException - the event cannot be found at this time
InsufficientResourcesException - if resources needed to perform the subscription are not available

unsubscribe

public void unsubscribe(int eventId,
                        StreamEventListener l)
                 throws UnknownEventException
This function is used to cancel the subscription to an event of a DSMCCEvent object.

Parameters:
eventId - Identifier of the event.
l - an object that implements the StreamEventListener Interface.
Throws:
UnknownEventException - The event can not be found.

unsubscribe

public void unsubscribe(java.lang.String eventName,
                        StreamEventListener l)
                 throws UnknownEventException
This function is used to cancel the subscription to an event of a DSMCCEvent object.

Parameters:
eventName - the name of the event.
l - an object that implements the StreamEventListener Interface.
Throws:
UnknownEventException - The event can not be found.

getEventList

public java.lang.String[] getEventList()
This function is used to get the list of the events of the DSMCCStreamEvent object.

Returns:
The list of the eventName.