All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ocap.si.ProgramMapTableManager.html Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version






ProgramMapTableManager














org.ocap.si
Class ProgramMapTableManager

java.lang.Object
  extended by org.ocap.si.ProgramMapTableManager

public abstract class ProgramMapTableManager
extends java.lang.Object

The Program Map Table (PMT) manager is used to discover and listen for MPEG-2 PMTs. To retrieve the PMT, an application add the TableChangeListener to the ProgramMapTableManager via the addInBandChangeListener() or the addOutOfBandChangeListener(), and call the retrieveInBand() or the retrieveOutOfBand(). If PMT has changed, ProgramMapTableManager call TableChangeListener.NotifyChange() to notify it. The application must get updated ProgramMapTable object via the SIChangeEvent.getSIElement() to keep the PMT table fresh when the PMT change is notified, i.e., ProgramMapTable object is not updated automatically.


Constructor Summary
protected ProgramMapTableManager()
          For Singleton behavior
 
Method Summary
abstract  void addInBandChangeListener(TableChangeListener listener, javax.tv.locator.Locator locator)
          Add a TableChangeListener object that will be notified when the inband PMT changes.
abstract  void addOutOfBandChangeListener(TableChangeListener listener, int programNumber)
          Add a TableChangeListener object that will be notified when the out-of-band PMT changes.
static ProgramMapTableManager getInstance()
          Get an instance of the Program Map Table Manager.
abstract  void removeInBandChangeListener(TableChangeListener listener)
          Remove the TableChangedListener object for the inband PMT.
abstract  void removeOutOfBandChangeListener(TableChangeListener listener)
          Remove the TableChangedListener object for the OOB PMT.
abstract  javax.tv.service.SIRequest retrieveInBand(javax.tv.service.SIRequestor requestor, javax.tv.locator.Locator locator)
           Retrieve a PMT from the in-band channel (transport stream) identified by the Locator parameter.
abstract  javax.tv.service.SIRequest retrieveOutOfBand(javax.tv.service.SIRequestor requestor, int programNumber)
          Retrieve the PMT from the out-of-band channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgramMapTableManager

protected ProgramMapTableManager()
For Singleton behavior

Method Detail

getInstance

public static ProgramMapTableManager getInstance()
Get an instance of the Program Map Table Manager.

Returns:
The ProgramMapTableManager instance.

addInBandChangeListener

public abstract void addInBandChangeListener(TableChangeListener listener,
                                             javax.tv.locator.Locator locator)
Add a TableChangeListener object that will be notified when the inband PMT changes. If the specified TableChangeListener object is already added, no action is performed. javax.tv.service.SIRequestFailureType.DATA_UNAVAILABLE is returned via SIRequestor.notifyFailure() if the locator refers to an analog service.

Parameters:
listener - A TableChangeListener object to be notified when the inband PMT changes.
locator - A locator to specify a virtual channel carrying the inband PMTs. Should correspond to one of the following OCAP URL forms: ocap://source_id, ocap://f=frequency.program_number

addOutOfBandChangeListener

public abstract void addOutOfBandChangeListener(TableChangeListener listener,
                                                int programNumber)
Add a TableChangeListener object that will be notified when the out-of-band PMT changes. If the specified TableChangeListener object is already added, no action is performed.

Parameters:
listener - A TableChangeListener object to be notified when the out-of-band PMT changes.
programNumber - A program number of the PMT from the corresponding PAT.

removeInBandChangeListener

public abstract void removeInBandChangeListener(TableChangeListener listener)
Remove the TableChangedListener object for the inband PMT.

Parameters:
listener - The TableChangeListener object to be removed.

removeOutOfBandChangeListener

public abstract void removeOutOfBandChangeListener(TableChangeListener listener)
Remove the TableChangedListener object for the OOB PMT.

Parameters:
listener - The TableChangeListener object to be removed.

retrieveInBand

public abstract javax.tv.service.SIRequest retrieveInBand(javax.tv.service.SIRequestor requestor,
                                                          javax.tv.locator.Locator locator)

Retrieve a PMT from the in-band channel (transport stream) identified by the Locator parameter.

The OCAP implementation does not automatically tune to the transport stream specified by the Locator. Hence, the calling application must tune to the corresponding transport stream before calling this method.

The attempt to retrieve a PMT stops silently and permanently when the network interface starts tuning to another transport stream. In this case, the registered SIRequestor.notifyFailure() method is invoked with a failure type of javax.tv.service.SIRequestFailureType.DATA_UNAVAILABLE.

It is not guaranteed that the transport stream specified by the Locator is still tuned when the method of the SIRequestor is called back.

Note: If an application has added a listener via the addInBandChangeListener() method, the TableChangeListener.notifyChange() method is called when the specified PMT is updated. In this case, the PMT returned to the SIRequestor registered with this method may have expired.

javax.tv.service.SIRequestFailureType.DATA_UNAVAILABLE is returned via SIRequestor.notifyFailure() if the locator refers to an analog service.

Parameters:
requestor - The SIRequestor object to be called back with the retrieval result, when the PMT is discovered.
locator - A locator to specify a virtual channel carrying the inband PMTs. Should correspond to one of the following OCAP URL forms: ocap://source_id, ocap://f=frequency.program_number
Returns:
The SIRequest object that identifies this asynchronous retrieval request and allows the request to be cancelled.

retrieveOutOfBand

public abstract javax.tv.service.SIRequest retrieveOutOfBand(javax.tv.service.SIRequestor requestor,
                                                             int programNumber)
Retrieve the PMT from the out-of-band channel. If there is no OOB PMT the SIRequestor.notifyFailure method will be called with a failure type of javax.tv.service.SIRequestFailureType.DATA_UNAVAILABLE.

Parameters:
requestor - The SIRequestor object to be called back with the retrieval result.
programNumber - A program number of the PMT from the corresponding PAT.
Returns:
The SIRequest object that identifies this asynchronous retrieval request and allows the request to be cancelled.






© 2015 - 2024 Weber Informatics LLC | Privacy Policy