DSMCCStreamEvent

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.dvb.dsmcc
Class DSMCCStreamEvent

    java.lang.Object
      org.dvb.dsmcc.DSMCCStream
          org.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(String path)` Create a DSMCCStreamEvent Object from its pathname.
`DSMCCStreamEvent(String path, String name)` Create a DSMCCStreamEvent from its pathname.

Method Summary
`String[]` | `getEventList()` This function is used to get the list of the events of the DSMCCStreamEvent object.
`int` | `subscribe(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(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
`equals, 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(String path)
                     throws 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:
    `IOException` - An IO error has occurred.
    `IllegalObjectTypeException` - the path does not lead to a DSMCC StreamEvent.

### DSMCCStreamEvent

    public DSMCCStreamEvent(String path,
                            String name)
                     throws 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:
    `IOException` - If an IO error occurred.
    `IllegalObjectTypeException` - the path does not lead to a DSMCC StreamEvent.

Method Detail

### subscribe

    public int subscribe(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(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 String[] getEventList()

  This function is used to get the list of the events of the DSMCCStreamEvent object.

  Returns:
    The list of the eventName.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD