@ThreadSafe public class DownSampleFilter extends MessageFilterBase
For position reports 1,2,3,4 and 18, only one message will be forwarded within the give sampling rate. E.g. one message per minute.
For static reports 5 and 24 the same apply. But it is handled separately from the position reports.
All remaining message types are passed through without down sampling.
| Constructor and Description |
|---|
DownSampleFilter()
Empty contructor
|
DownSampleFilter(long samplingRate)
Constructor given sampling rate in seconds
|
| Modifier and Type | Method and Description |
|---|---|
long |
getSamplingRate()
Get sampling rate in seconds
|
boolean |
rejectedByFilter(AisMessage message)
Rejected by filter boolean.
|
void |
setSamplingRate(long samplingRate)
Set sampling rate in seconds
|
rejectedByFilterpublic DownSampleFilter()
public DownSampleFilter(long samplingRate)
samplingRate - the sampling ratepublic boolean rejectedByFilter(AisMessage message)
IMessageFiltermessage - the messagepublic long getSamplingRate()
public void setSamplingRate(long samplingRate)
samplingRate - the sampling rateCopyright © 2011–2019 Danish Maritime Authority. All rights reserved.