|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.davic.mpeg.sections.SectionFilterGroup
public class SectionFilterGroup
This class represents a group of MPEG-2 section filters to be activated and de-activated as an atomic operation. The purpose of this class is to minimize the potential for resource deadlock between independent pieces of application(s).
Constructor Summary | |
---|---|
SectionFilterGroup(int numberOfFilters)
Creates a section filter group object with an associated number of section filters needed to be reserved when the object is to be connected to an active source of MPEG-2 sections. |
|
SectionFilterGroup(int numberOfFilters,
boolean resourcePriority)
Creates a section filter group object with an associated number of section filters needed to be reserved when the object is to be connected to an active source of MPEG-2 sections. |
Method Summary | |
---|---|
void |
addResourceStatusEventListener(ResourceStatusListener listener)
Specifies an object to be notified of changes in the status of resources related to a SectionFilterGroup object. |
void |
attach(TransportStream stream,
ResourceClient client,
java.lang.Object requestData)
Connects a SectionFilterGroup to an MPEG-2 transport stream. |
void |
detach()
Returns a SectionFilterGroup to the disconnected state. |
ResourceClient |
getClient()
Returns the ResourceClient object specified in the last call to the attach() method as to be notified in the case that the section filters acquired by the SectionFilterGroup during that call to attach() are removed by the environment for any reason. |
TransportStream |
getSource()
Returns the MPEG-2 transport stream to which a SectionFilterGroup is currently connected. |
RingSectionFilter |
newRingSectionFilter(int ringSize)
Creates a new ring section filter within the parent section filter group. |
RingSectionFilter |
newRingSectionFilter(int ringSize,
int sectionSize)
Creates a new ring section filter within the parent section filter group. |
SimpleSectionFilter |
newSimpleSectionFilter()
Creates a new simple section filter object within the parent section filter group. |
SimpleSectionFilter |
newSimpleSectionFilter(int sectionSize)
Creates a new simple section filter object within the parent section filter group. |
TableSectionFilter |
newTableSectionFilter()
Creates a new table section filter object within the parent section filter group. |
TableSectionFilter |
newTableSectionFilter(int sectionSize)
Creates a new table section filter object within the parent section filter group. |
void |
removeResourceStatusEventListener(ResourceStatusListener listener)
Indicates that an object is no longer to be notified of changes in the status of resources as setup by addResourceStatusEventListener. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SectionFilterGroup(int numberOfFilters)
numberOfFilters
- the number of section filters needed for the object.
IlegalArgumentException
- if numberOfFilters is less than one.public SectionFilterGroup(int numberOfFilters, boolean resourcePriority)
numberOfFilters
- the number of section filters needed for the objectresourcePriority
- the resource priority of the object should the number of section filters
available to the package become insufficient. High priority is indicated by true and low priority
by false. The scope of the resourcePriority shall be a single application only.
IlegalArgumentException
- if numberOfFilters is less than one.Method Detail |
---|
public SimpleSectionFilter newSimpleSectionFilter()
public SimpleSectionFilter newSimpleSectionFilter(int sectionSize)
sectionSize
- specifies the size in bytes of the buffer to be created to hold data captured by the
SectionFilter. If sections are filtered which are larger than this then the extra data will be
dropped and filtering continue without any notification to the application.
java.lang.IllegalArgumentException
- if sectionSize <1.public RingSectionFilter newRingSectionFilter(int ringSize)
ringSize
- the number of Section objects to be created for use in the ring.
java.lang.IllegalArgumentException
- if ringSize <1.public RingSectionFilter newRingSectionFilter(int ringSize, int sectionSize)
ringSize
- the number of Section objects to be created for use in the ring.sectionSize
- the size in bytes of the buffer for each Section object. If sections are filtered which
are larger than this then the extra data will be dropped and filtering continue without any
notification to the application.
java.lang.IllegalArgumentException
- if ringSize <1.
java.lang.IllegalArgumentException
- if sectionSize <1.public TableSectionFilter newTableSectionFilter()
public TableSectionFilter newTableSectionFilter(int sectionSize)
sectionSize
- specifies the size in bytes of the buffer to be created to hold data captured by the
SectionFilter. When the first section has been captured and the total number of sections in the
table known, each Section created will have a buffer of this size. If sections are filtered which
are larger than this then the extra data will be dropped and filtering continue without any
notification to the application.
java.lang.IllegalArgumentException
- if sectionSize <1.public void attach(TransportStream stream, ResourceClient client, java.lang.Object requestData) throws FilterResourceException, InvalidSourceException, TuningException, NotAuthorizedException
stream
- specifies the source of MPEG-2 sections for filteringclient
- specifies an object to be notified if the section filters acquired during this method are
later removed by the environment for any reason.requestData
- application specific data for use by the resource notification API
FilterResourceException
- if reserving the specified section filters fails
InvalidSourceException
- if the source is not a valid source of MPEG-2 sections.
TuningException
- if the source is not currently tuned to
NotAuthorizedException
- if the information requested is scrambled and
permission to descramble it is refused.public void detach()
public TransportStream getSource()
public ResourceClient getClient()
getClient
in interface ResourceProxy
public void addResourceStatusEventListener(ResourceStatusListener listener)
addResourceStatusEventListener
in interface ResourceServer
listener
- the object to be notifiedpublic void removeResourceStatusEventListener(ResourceStatusListener listener)
removeResourceStatusEventListener
in interface ResourceServer
listener
- the object no longer to be notified
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |