|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ocap.si.ProgramMapTableManager
public abstract class ProgramMapTableManager
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 |
---|
protected ProgramMapTableManager()
Method Detail |
---|
public static ProgramMapTableManager getInstance()
public abstract void addInBandChangeListener(TableChangeListener listener, javax.tv.locator.Locator locator)
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_numberpublic abstract void addOutOfBandChangeListener(TableChangeListener listener, int programNumber)
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.public abstract void removeInBandChangeListener(TableChangeListener listener)
listener
- The TableChangeListener object to be removed.public abstract void removeOutOfBandChangeListener(TableChangeListener listener)
listener
- The TableChangeListener object to be removed.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.
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
public abstract javax.tv.service.SIRequest retrieveOutOfBand(javax.tv.service.SIRequestor requestor, int programNumber)
requestor
- The SIRequestor object to be called back with
the retrieval result.programNumber
- A program number of the PMT from the
corresponding PAT.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |