Class ReportProcessor
-
- All Implemented Interfaces:
-
com.google.common.util.concurrent.Service
public class ReportProcessor extends AbstractIdleServiceClass that is responsible for buffering and processing of incoming reports.
As long as there is no MDIB (plus optional context states) available, the report processor buffers incoming reports and only applies them once an MDIB (plus optional context states) was set. In case every report type is received through one subscription, the ReportProcessor ensures data coherency.
-
-
Method Summary
Modifier and Type Method Description voidprocessEpisodicReport(EpisodicReport report)Queues or processes a report. voidstartApplyingReportsOnMdib(RemoteMdibAccess mdibAccess)Accepts an MDIB and starts applying reports on it. -
Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, awaitRunning, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
processEpisodicReport
void processEpisodicReport(EpisodicReport report)
Queues or processes a report.
In case no MDIB was set via startApplyingReportsOnMdib yet, this function queues incoming reports. Once startApplyingReportsOnMdib was called, reports are directly applied on the injected RemoteMdibAccess instance.
As soon as the ReportProcessor is shut down, no reports will be processed henceforth.
- Parameters:
report- the report to process.
-
startApplyingReportsOnMdib
void startApplyingReportsOnMdib(RemoteMdibAccess mdibAccess)
Accepts an MDIB and starts applying reports on it.
- Parameters:
mdibAccess- the MDIB access to use for application of incoming reports.
-
-
-
-