Package com.inmobi.commons.core.incident
Class DetectorManager
-
- All Implemented Interfaces:
-
com.inmobi.commons.core.incident.Detector.DetectorListener
public final class DetectorManager implements Detector.DetectorListener
Manages multiple incident detectors and forwards detected incidents to registered actors.
-
-
Constructor Summary
Constructors Constructor Description DetectorManager(Context context, CrashConfig crashConfig, MultiEventBus eventBus)
-
Method Summary
Modifier and Type Method Description final UnitupdateCrashConfig(CrashConfig crashConfig)final Unitstart()Starts all registered incident detectors. final Unitstop()Stops all registered incident detectors. UnitonIncidentDetected(IncidentEvent incidentEvent)Callback method invoked when an incident is detected by any detector. final List<Detector>getDetectors()-
-
Constructor Detail
-
DetectorManager
DetectorManager(Context context, CrashConfig crashConfig, MultiEventBus eventBus)
- Parameters:
context- The application context.crashConfig- The configuration for incident detection and handling.eventBus- a MultiEventBus object which will be used to alert the system of an incident
-
-
Method Detail
-
updateCrashConfig
final Unit updateCrashConfig(CrashConfig crashConfig)
-
onIncidentDetected
Unit onIncidentDetected(IncidentEvent incidentEvent)
Callback method invoked when an incident is detected by any detector. Notifies all registered actors about the detected incident.
- Parameters:
incidentEvent- The detected incident.
-
getDetectors
final List<Detector> getDetectors()
-
-
-
-