org.placelab.client.tracker
Class FilteredEstimateListener
java.lang.Object
org.placelab.client.tracker.FilteredEstimateListener
- All Implemented Interfaces:
- EstimateListener
- public class FilteredEstimateListener
- extends java.lang.Object
- implements EstimateListener
This filters estimateUpdated measurements by either count or
time.
So, for instance, you could say that you only want to
get estimateUpdated every 3 seconds or you could filter by
count and get only every fifth estimateUpdated.
You use this by creating it with your EstimateListener object
and then registering this with the Tracker you wish to filter
estimateUpdated events from.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILTER_BY_TIME
public static final int FILTER_BY_TIME
- See Also:
- Constant Field Values
FILTER_BY_NUMBER
public static final int FILTER_BY_NUMBER
- See Also:
- Constant Field Values
FilteredEstimateListener
public FilteredEstimateListener(EstimateListener listener,
long interval,
int intervalType)
- Create a FilteredEstimateListener
- Parameters:
listener - the object to receive the estimateUpdated messagesinterval - the minimum time or count between estimateUpdated messages
you want to takeintervalType - either FILTER_BY_NUMBER or FILTER_BY_TIME
estimateUpdated
public void estimateUpdated(Tracker t,
Estimate e,
Measurement m)
- Description copied from interface:
EstimateListener
- Implement this method to respond to updates from the Tracker(s)
you are registered with.
- Specified by:
estimateUpdated in interface EstimateListener
- Parameters:
t - the Tracker producing the Estimatee - the Estimate produced by the Trackerm - the latest Measurement used by the Tracker to produce the Estimate