|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
com.alien.enterpriseRFID.tags.TagTable
TagTable stores tags as they appear and removes out of date tags. It a provides host-level implementation of persistence time, similar to what the reader does with its taglist. Tags that are in a TagTable and haven't been seen for more that the TagTable's persistence time can be removed from the TagTable.
You retrieve the list of tags in a TagTable through its getTagList()
method, which returns an array of Tag
s.
Field Summary | |
static int |
FOREVER
Setting persistTime to FOREVER means the tags in this TagTable never become inactive. |
Constructor Summary | |
TagTable()
Constructs an empty TagTable, combining tag/antenna data. |
|
TagTable(boolean antennaCombine)
Constructs an empty TagTable. |
Method Summary | |
boolean |
addTag(Tag tag)
Adds a Tag to this TagTable. |
void |
clearTagList()
Clears all of the tags from this TagTable. |
int |
getPersistTime()
Returns this TagTable's persistence time. |
Tag[] |
getTagList()
Returns the list of tags in this TagTable, as an array of Tag objects. |
TagTableListener |
getTagTableListener()
Returns the TagTableListener that has been registered with this TagTable
to receive notifications when the tag list changes. |
boolean |
removeOldTags()
Removes Tags from this TagTable whose TimeToLive has reached zero. |
boolean |
removeTag(Tag tag)
Removes a Tag from this TagTable. |
void |
setPersistTime(int persistTime)
Specifies the persistence time for tags in this TagTable. |
void |
setTagTableListener(TagTableListener tagTableListener)
Registers a TagTableListener with this TagTable to be notified when
the tag list changes. |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int FOREVER
Constructor Detail |
public TagTable(boolean antennaCombine)
antennaCombine
flag determines
if the same tagID observed on different antennas should be combined into one
entry (adding the readCounts).
The default behavior (using the constructor without arguments) is to combine this antenna data.
public TagTable()
TagTable(boolean)
, which gives control over this feature.
Method Detail |
public int getPersistTime()
removeOldTags()
method.
setPersistTime(int)
public void setPersistTime(int persistTime)
removeOldTags()
method.
persistTime
- the persistence time for tags in this TagTablegetPersistTime()
public void clearTagList()
public boolean addTag(Tag tag)
TagTableListener
is also
notified.
This method returns true
if the added Tag is new, and false
if it is an existing tag being renewed.
tag
- the Tag to be added to this TagTable
public boolean removeTag(Tag tag)
false
if the Tag is
null or doesn't exist in this TagTable, and true
otherwise.
tag
- the Tag to remove from this TagTable
public boolean removeOldTags()
This method returns true
if tags were removed from this TagTable,
and false
otherwise.
public Tag[] getTagList()
public TagTableListener getTagTableListener()
TagTableListener
that has been registered with this TagTable
to receive notifications when the tag list changes.
setTagTableListener(TagTableListener)
public void setTagTableListener(TagTableListener tagTableListener)
TagTableListener
with this TagTable to be notified when
the tag list changes.
tagTableListener
- the TagTableListener to be registered by this TagTablegetTagTableListener()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |