Class Inventory

    • Constructor Detail

      • Inventory

        public Inventory​(String identifier)
        Parameters:
        identifier - inventory identifier
      • Inventory

        public Inventory​(String identifier,
                         InventoryListener listener)
        Parameters:
        identifier - inventory identifier
        listener - the listener
      • Inventory

        public Inventory​(String identifier,
                         InventoryListener listener,
                         long tagKeepTime)
        Parameters:
        identifier - inventory identifier
        listener - the listener
        tagKeepTime - the tag keep time (to disable automatic removing tags, set keep time to 0)
    • Method Detail

      • initInventory

        public void initInventory​(Map<String,​Long> timestampByTagId)
        Parameters:
        timestampByTagId - map with timestamp by transponder id
      • updateInventory

        public void updateInventory​(Collection<String> inventory,
                                    long timestamp)
        update the current inventory
        Parameters:
        inventory - Collection with the tag ids
        timestamp - inventory timestamp
      • getInventory

        public List<String> getInventory()
        Return a List with the current inventory
        Returns:
        a List with the current inventory
      • getKeepTime

        public long getKeepTime()
        Returns:
        the current tag keep time
      • setKeepTime

        public void setKeepTime​(long keepTime)
        Parameters:
        keepTime - the tag keep time to set
      • start

        public void start()
        start automatically checking the inventory for lost tags
      • stop

        public void stop()
        stop automatically checking tags
      • isSticky

        public boolean isSticky()
        Returns:
        the isSticky
      • removeTag

        public void removeTag​(String tagEid)
        Remove a tag from this list
        Parameters:
        tagEid - tag eid to remove
      • clear

        public void clear()
        Remove all tags from the inventory
      • isAlive

        public boolean isAlive()
        Returns:
        true if the inventory checking thread is alive