ProgramAssociationTableManager

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.ocap.si
Class ProgramAssociationTableManager

    java.lang.Object
      org.ocap.si.ProgramAssociationTableManager

    public abstract class ProgramAssociationTableManager

extends Object

The Program Association Table (PAT) manager is used to discover and listen for PATs. To retrieve the PAT, an application add the TableChangeListener to ProgramAssociationTableManager via the addInBandChangeListener() or the addOutOfBandChangeListener(), and call the retrieveInBand() or the retrieveOutOfBand(). If PAT has changed, ProgramAssociationTableManager calls the TableChangeListener.notifyChange() to notify it. The application must get the ProgramAssociationTable object via the SIChangeEvent.getSIElement() method to keep the PAT table fresh when the PAT change is notified, i.e., ProgramAssociationTable is not updated automatically.

Method Summary
`abstract void` | `addInBandChangeListener(TableChangeListener listener, Locator locator)` Add a TableChangeListener object that will be notified when the inband PAT for the channel (transport stream) identified by the Locator parameter changes.
`abstract void` | `addOutOfBandChangeListener(TableChangeListener listener)` Add a TableChangeListener object that will be notified when the out-of-band PAT changes.
`static ProgramAssociationTableManager` | `getInstance()` Get an instance of the Program Association Table Manager.
`abstract void` | `removeInBandChangeListener(TableChangeListener listener)` Remove the TableChangeListener object for the inband PAT.
`abstract void` | `removeOutOfBandChangeListener(TableChangeListener listener)` Remove the TableChangeListener object for the OOB PAT.
`abstract SIRequest` | `retrieveInBand(SIRequestor requestor, Locator locator)` Retrieve a PAT from the in-band channel (transport stream) identified by the Locator parameter.
`abstract SIRequest` | `retrieveOutOfBand(SIRequestor requestor)` Retrieve the PAT from the out-of-band channel.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static ProgramAssociationTableManager getInstance()

  Get an instance of the Program Association Table Manager.

  Returns:
    The ProgramAssociationTableManager instance.

### addInBandChangeListener

    public abstract void addInBandChangeListener(TableChangeListener listener,
                                                 Locator locator)

  Add a TableChangeListener object that will be notified when the inband PAT for the channel (transport stream) identified by the Locator parameter changes. If the specified TableChangeListener object is already added, no action is performed.

  Parameters:
    `listener` - A TableChangeListener object to be informed when the inband PAT changes.
    `locator` - A locator to specify the channels (transport streams) carry the PATs. 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)

  Add a TableChangeListener object that will be notified when the out-of-band PAT changes. If the specified TableChangeListener object is already added, no action is performed.

  Parameters:
    `listener` - A TableChangeListener object to be informed when the out-of-band PAT changes.

### removeInBandChangeListener

    public abstract void removeInBandChangeListener(TableChangeListener listener)

  Remove the TableChangeListener object for the inband PAT.

  Parameters:
    `listener` - The TableChangeListener object to be removed.

### removeOutOfBandChangeListener

    public abstract void removeOutOfBandChangeListener(TableChangeListener listener)

  Remove the TableChangeListener object for the OOB PAT.

  Parameters:
    `listener` - The TableChangeListener object to be removed.

### retrieveInBand

    public abstract SIRequest retrieveInBand(SIRequestor requestor,
                                             Locator locator)

  Retrieve a PAT 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 PAT 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 PAT is updated. In this case, the PAT returned to the `SIRequestor` registered with this method may have expired.

  Parameters:
    `requestor` - The SIRequestor object to be called back with the retrieval result.
    `locator` - A locator to specify the channels (transport streams) carrying the PATs. 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 SIRequest retrieveOutOfBand(SIRequestor requestor)

  Retrieve the PAT from the out-of-band channel. If there is no OOB PAT 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.
  Returns:
    The SIRequest object that identifies this asynchronous retrieval request and allows the request to be cancelled.

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

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