SectionFilter

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.davic.mpeg.sections
Class SectionFilter

    java.lang.Object
      org.davic.mpeg.sections.SectionFilter

Direct Known Subclasses:
  RingSectionFilter, SimpleSectionFilter, TableSectionFilter

    public abstract class SectionFilter

extends Object

This class is the base class for a set of classes describing section filters with different characteristics of life cycle and buffering. When a SectionFilterGroup is detached, either by the client or through resource withdrawal, started SectionFilters shall remain started. Hence if the SectionFilterGroup is re-attached, those filters shall re-activate.

Version:
  Updated to DAVIC 1.3.1

Method Summary
`void` | `addSectionFilterListener(SectionFilterListener listener)` Specifies an object to be notified of events relating to this SectionFilter object.
`void` | `removeSectionFilterListener(SectionFilterListener listener)` Indicates that an object is no longer to be notified of events relating to this SectionFilter object.
`void` | `setTimeOut(long milliseconds)` Sets the time-out for this section filter.
`void` | `startFiltering(Object appData, int pid)` Defines a SectionFilter object as filtering only for sections matching a specific PID.
`void` | `startFiltering(Object appData, int pid, int table_id)` Defines a SectionFilter object as filtering only for sections matching a specific PID and table_id.
`void` | `startFiltering(Object appData, int pid, int table_id, byte[] posFilterDef, byte[] posFilterMask)` Defines a SectionFilter object as filtering only for sections matching a specific PID and table_id, and where contents of the section match the specified filter pattern.
`void` | `startFiltering(Object appData, int pid, int table_id, byte[] posFilterDef, byte[] posFilterMask, byte[] negFilterDef, byte[] negFilterMask)` Defines a SectionFilter object as filtering only for sections matching a specific PID and table_id, and where contents of the section match the specified filter pattern.
`void` | `startFiltering(Object appData, int pid, int table_id, int offset, byte[] posFilterDef, byte[] posFilterMask)` Defines a SectionFilter object as filtering only for sections matching a specific PID and table_id, and where contents of the section match the specified filter pattern.
`void` | `startFiltering(Object appData, int pid, int table_id, int offset, byte[] posFilterDef, byte[] posFilterMask, byte[] negFilterDef, byte[] negFilterMask)` Defines a SectionFilter object as filtering only for sections matching a specific PID and table_id, and where contents of the section match the specified filter pattern.
`void` | `stopFiltering()` If the parent SectionFilterGroup is attached to a TransportStream then filtering for sections matching this SectionFilter object will stop.

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

Method Detail

### startFiltering

    public void startFiltering(Object appData,
                               int pid)
                        throws FilterResourceException,
                               NotAuthorizedException,
                               IllegalFilterDefinitionException,
                               ConnectionLostException

  Defines a SectionFilter object as filtering only for sections matching a specific PID. If the parent SectionFilterGroup is attached to a TransportStream then filtering will start immediately.

  Parameters:
    `appData` - An object supplied by the application. This object will be delivered to the subscribed section filter listener as part of all SectionFilterEvents that will be generated because of this method call. The application can use this object for internal communication purposes. If the application does not need any application data, the parameter can be null.
    `pid` - the value of the PID to filter for in incoming sections
  Throws:
    `FilterResourceException` - if all the number of started SectionFilters for the parent SectionFilterGroup is already equal to the number of section filters associated with the SectionFilterGroup when it was created. Note that this is applied whether the parent section filter group is connected to a TS or not.
    `NotAuthorizedException` - if the information requested is scrambled and permission to descramble it is refused.
    `IllegalFilterDefinitionException` - if called for a TableSectionFilter.
    `ConnectionLostException` - if the parent SectionFilterGroup is in the ConnectionLost state and hence is unable to satisfy the method call due to absence of resources or absence of sections to filter.

### startFiltering

    public void startFiltering(Object appData,
                               int pid,
                               int table_id)
                        throws FilterResourceException,
                               NotAuthorizedException,
                               ConnectionLostException,
                               IllegalFilterDefinitionException

  Defines a SectionFilter object as filtering only for sections matching a specific PID and table_id. If the parent SectionFilterGroup is attached to a TransportStream then filtering will start immediately.

  Parameters:
    `appData` - An object supplied by the application. This object will be delivered to the subscribed section filter listener as part of all SectionFilterEvents that will be generated because of this method call. The application can use this object for internal communication purposes. If the application does not need any application data, the parameter can be null.
    `pid` - the value of the PID to filter for in incoming sections
    `table_id` - the value of the table_id to filter for in incoming sections
  Throws:
    `FilterResourceException` - if all the number of started SectionFilters for the parent SectionFilterGroup is already equal to the number of section filters associated with the SectionFilterGroup when it was created. Note that this is applied whether the parent section filter group is connected to a TS or not.
    `NotAuthorizedException` - if the information requested is scrambled and permission to descramble it is refused.
    `ConnectionLostException` - if the parent SectionFilterGroup is in the ConnectionLost state and hence is unable to satisfy the method call due to absence of resources or absence of sections to filter.
    `IllegalFilterDefinitionException` - where either integer is negative or larger than allowed by the MPEG specification

### startFiltering

    public void startFiltering(Object appData,
                               int pid,
                               int table_id,
                               byte[] posFilterDef,
                               byte[] posFilterMask)
                        throws FilterResourceException,
                               IllegalFilterDefinitionException,
                               NotAuthorizedException,
                               ConnectionLostException

  Defines a SectionFilter object as filtering only for sections matching a specific PID and table_id, and where contents of the section match the specified filter pattern. The first byte of each array corresponds to the third byte of the section. If the parent SectionFilterGroup is attached to a TransportStream then filtering will start immediately.

  Parameters:
    `appData` - An object supplied by the application. This object will be delivered to the subscribed section filter listener as part of all SectionFilterEvents that will be generated because of this method call. The application can use this object for internal communication purposes. If the application does not need any application data, the parameter can be null.
    `pid` - the value of the PID to filter for in incoming sections.
    `table_id` - the value of the table_id field to filter for in incoming sections
    `posFilterDef` - defines values to match for bits in the section, as defined in clause E.8.1.
    `posFilterMask` - defines which bits in the section are to be compared against the values specified in the posFilterDef parameter, as defined in clause E.8.1.
  Throws:
    `FilterResourceException` - if all the number of started SectionFilters for the parent SectionFilterGroup is already equal to the number of section filters associated with the SectionFilterGroup when it was created. Note that this is applied whether the parent section filter group is connected to a TS or not.
    `IllegalFilterDefinitionException` - the filter definition specified is illegal either because the posFilterDef and posFilterMask arrays are of different sizes or because their length is beyond the filtering capacity of the system.
    `NotAuthorizedException` - if the information requested is scrambled and permission to descramble it is refused.
    `ConnectionLostException` - if the parent SectionFilterGroup is in the ConnectionLost state and hence is unable to satisfy the method call due to absence of resources or absence of sections to filter.

### startFiltering

    public void startFiltering(Object appData,
                               int pid,
                               int table_id,
                               int offset,
                               byte[] posFilterDef,
                               byte[] posFilterMask)
                        throws FilterResourceException,
                               IllegalFilterDefinitionException,
                               NotAuthorizedException,
                               ConnectionLostException

  Defines a SectionFilter object as filtering only for sections matching a specific PID and table_id, and where contents of the section match the specified filter pattern. If the parent SectionFilterGroup is attached to a TransportStream then filtering will start immediately.

  Parameters:
    `appData` - An object supplied by the application. This object will be delivered to the subscribed section filter listener as part of all SectionFilterEvents that will be generated because of this method call. The application can use this object for internal communication purposes. If the application does not need any application data, the parameter can be null.
    `pid` - the value of the PID to filter for in incoming sections.
    `table_id` - the value of the table_id field to filter for in incoming sections
    `offset` - defines the offset within the section which the first byte of the posFilterDef and posFilterMask arrays is intended to match. The offset must be less than 31 as described in DAVIC part 10, section 115.3. The offset must be equal to or greater than 3.
    `posFilterDef` - defines values to match for bits in the section, as defined in clause E.8.1.
    `posFilterMask` - defines which bits in the section are to be compared against the values specified in the posFilterDef parameter, as defined in clause E.8.1.
  Throws:
    `FilterResourceException` - if all the number of started SectionFilters for the parent SectionFilterGroup is already equal to the number of section filters associated with the SectionFilterGroup when it was created. Note that this is applied whether the parent section filter group is connected to a TS or not.
    `IllegalFilterDefinitionException` - the filter definition specified is illegal either because the posFilterDef and posFilterMask arrays are not the same size or because their length is beyond the filtering capacity of the system or because the specified offset is too large.
    `NotAuthorizedException` - if the information requested is scrambled and permission to descramble it is refused.
    `ConnectionLostException` - if the parent SectionFilterGroup is in the ConnectionLost state and hence is unable to satisfy the method call due to absence of resources or absence of sections to filter.

### startFiltering

    public void startFiltering(Object appData,
                               int pid,
                               int table_id,
                               byte[] posFilterDef,
                               byte[] posFilterMask,
                               byte[] negFilterDef,
                               byte[] negFilterMask)
                        throws FilterResourceException,
                               IllegalFilterDefinitionException,
                               NotAuthorizedException,
                               ConnectionLostException

  Defines a SectionFilter object as filtering only for sections matching a specific PID and table_id, and where contents of the section match the specified filter pattern. The first byte of each array corresponds to the third byte of the section. If the parent SectionFilterGroup is attached to a TransportStream then filtering will start immediately.

  Parameters:
    `appData` - An object supplied by the application. This object will be delivered to the subscribed section filter listener as part of all SectionFilterEvents that will be generated because of this method call. The application can use this object for internal communication purposes. If the application does not need any application data, the parameter can be null.
    `pid` - the value of the PID to filter for in incoming sections.
    `table_id` - the value of the table_id field to filter for in incoming sections
    `posFilterDef` - defines values to match for bits in the section, as defined in clause E.8.1.
    `posFilterMask` - defines which bits in the section are to be compared against the values specified in the posFilterDef parameter, as defined in clause E.8.1.
    `negFilterDef` - defines values to match for bits in the section, as defined in clause E.8.1.
    `negFilterMask` - defines which bits in the section are to be compared against the values specified in the negFilterDef parameter, as defined in clause E.8.1.
  Throws:
    `FilterResourceException` - if all the number of started SectionFilters for the parent SectionFilterGroup is already equal to the number of section filters associated with the SectionFilterGroup when it was created. Note that this is applied whether the parent section filter group is connected to a TS or not.
    `IllegalFilterDefinitionException` - the filter definition specified is illegal either because the arrays posFilterDef, posFilterMask, negFilterDef, negFilterMask are not all the same size or because their length is beyond the filtering capacity of the system.
    `NotAuthorizedException` - if the information requested is scrambled and permission to descramble it is refused.
    `ConnectionLostException` - if the parent SectionFilterGroup is in the ConnectionLost state and hence is unable to satisfy the method call due to absence of resources or absence of sections to filter.

### startFiltering

    public void startFiltering(Object appData,
                               int pid,
                               int table_id,
                               int offset,
                               byte[] posFilterDef,
                               byte[] posFilterMask,
                               byte[] negFilterDef,
                               byte[] negFilterMask)
                        throws FilterResourceException,
                               IllegalFilterDefinitionException,
                               NotAuthorizedException,
                               ConnectionLostException

  Defines a SectionFilter object as filtering only for sections matching a specific PID and table_id, and where contents of the section match the specified filter pattern. If the parent SectionFilterGroup is attached to a TransportStream then filtering will start immediately.

  Parameters:
    `appData` - An object supplied by the application. This object will be delivered to the subscribed section filter listener as part of all SectionFilterEvents that will be generated because of this method call. The application can use this object for internal communication purposes. If the application does not need any application data, the parameter can be null.
    `pid` - the value of the PID to filter for in incoming sections.
    `table_id` - the value of the table_id field to filter for in incoming sections
    `offset` - defines the offset within the section which the first byte of the posFilterDef, posFilterMask, negFilterDef and negFilterMask arrays is intended to match. The offset must be less than 31 as described in DAVIC part 10, section 115.3. The offset must be equal to or greater than 3.
    `posFilterDef` - defines values to match for bits in the section, as defined in clause E.8.1.
    `posFilterMask` - defines which bits in the section are to be compared against the values specified in the posFilterDef parameter, as defined in clause E.8.1.
    `negFilterDef` - defines values to match for bits in the section, as defined in clause E.8.1.
    `negFilterMask` - defines which bits in the section are to be compared against the values specified in the negFilterDef parameter, as defined in clause E.8.1.
  Throws:
    `FilterResourceException` - if all the number of started SectionFilters for the parent SectionFilterGroup is already equal to the number of section filters associated with the SectionFilterGroup when it was created. Note that this is applied whether the parent section filter group is connected to a TS or not.
    `IllegalFilterDefinitionException` - the filter definition specified is illegal either because the posFilterDef, posFilterMask, negFilterDef, negFilterMask arrays are not all the same size or because their length is beyond the filtering capacity of the system or because the specified offset is too large.
    `NotAuthorizedException` - if the information requested is scrambled and permission to descramble it is refused.
    `ConnectionLostException` - if the parent SectionFilterGroup is in the ConnectionLost state and hence is unable to satisfy the method call due to absence of resources or absence of sections to filter.

### stopFiltering

    public void stopFiltering()

  If the parent SectionFilterGroup is attached to a TransportStream then filtering for sections matching this SectionFilter object will stop. If the parent is not attached then should it become attached, filtering for sections matching this SectionFilter object will not start.

### setTimeOut

    public void setTimeOut(long milliseconds)
                    throws IllegalArgumentException

  Sets the time-out for this section filter. When the time-out happens, a TimeOutEvent will be generated and sent to the SectionFilter object and filtering stops. For a SimpleSectionFilter this will be generated if no sections arrive within the specified period. For a TableSectionFilter, this will be generated if the complete table does not arrive within the specified time. For a RingSectionFilter, this will be generated if the specified time has elapsed since the arrival of the last section being successfully filtered. Setting a time-out of 0 milliseconds has the effect of removing a possible time-out. A set time-out only applies to subsequent filter activations, not to a possible filter activation that is currently in progress when the call to this method is made. The default time-out value is 0.

  Parameters:
    `milliseconds` - the time out period
  Throws:
    `IllegalArgumentException` - if the 'milliseconds' parameter is negative

### addSectionFilterListener

    public void addSectionFilterListener(SectionFilterListener listener)

  Specifies an object to be notified of events relating to this SectionFilter object.

  Parameters:
    `listener` - the object to be notified of events

### removeSectionFilterListener

    public void removeSectionFilterListener(SectionFilterListener listener)

  Indicates that an object is no longer to be notified of events relating to this SectionFilter object. If the object was not specified as to be notified then this method has no effect.

  Parameters:
    `listener` - the object no longer to be notified of events

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

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