com.veriplace.client.util
Interface PollingFilter
public interface PollingFilter
An object that can tell PollingManager whether or not to query the
location details for a given location update. Use this interface if you only
care about location updates for specific users, or if you are storing updates
in a database and want to avoid getting duplicates. (Note that
PollingManager attempts to avoid duplicates, but uses an in-memory cache, so
that mechanism will not help if the application is restarted or if there are
multiple instances of the application running.)
- Since:
- 2.4
shouldGetLocationUpdate
boolean shouldGetLocationUpdate(PollingManager manager,
User user,
LocationUpdateReference locRef,
java.lang.Object batch)
- Decides whether or not the application cares about a particular location
update. If this method returns false, PollingManager will not query the
location details and will not pass this update to the
PollingHandler.
- Parameters:
manager - the PollingManager that is calling this methoduser - the Veriplace user identifierlocRef - the location update referencebatch - the object previously returned by
PollingHandler.beginLocationBatch(PollingManager, com.veriplace.client.LocationUpdates)
(you may use this to maintain state such as a database transaction)
- Returns:
- true if the location details should be queried and passed to the
PollingHandler; false to ignore this update