public class TestConsumer extends java.lang.Object implements FilteredConsumer
Modifier and Type | Class and Description |
---|---|
class |
TestConsumer.EventInfo
Simple class to collect some info about update events for the UnitTest.
|
Modifier and Type | Method and Description |
---|---|
void |
endDetection(DetectionKey key)
This method is called to end an existing detection
pre-condition: startDetection has been previously called with the same channelMask/band.
|
java.util.Queue<TestConsumer.EventInfo> |
events() |
void |
startDetection(DetectionKey key)
This method is called when a new detection starts on the given channel and band
|
boolean |
updateDetection(DetectionKey key,
NormalizedDataUnit ndu)
This method is called to append a DetectionEvent to a running detection
pre-condition: startDetection has been called for the given key (channelMask and band)
At least one update will be given per detection.
|
public void startDetection(DetectionKey key)
FilteredConsumer
startDetection
in interface FilteredConsumer
key
- The key associated with the starting detectionpublic boolean updateDetection(DetectionKey key, NormalizedDataUnit ndu)
FilteredConsumer
updateDetection
in interface FilteredConsumer
key
- The key of the detectionndu
- The data for the update.public void endDetection(DetectionKey key)
FilteredConsumer
endDetection
in interface FilteredConsumer
key
- The key associated with the ending detection.public java.util.Queue<TestConsumer.EventInfo> events()