Interface Engine

  • All Superinterfaces:
    org.opennms.alec.datasource.api.AlarmFeedbackHandler, org.opennms.alec.datasource.api.AlarmHandler, org.opennms.alec.datasource.api.InventoryHandler

    public interface Engine
    extends org.opennms.alec.datasource.api.AlarmHandler, org.opennms.alec.datasource.api.InventoryHandler, org.opennms.alec.datasource.api.AlarmFeedbackHandler
    An engine that consumes alarms, inventory and alarm feedback to produce correlated situations.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void deleteSituation​(String situationId)
      Delete the situation with the given situation Id.
      void destroy()  
      long getTickResolutionMs()  
      void init​(List<org.opennms.alec.datasource.api.Alarm> alarms, List<org.opennms.alec.datasource.api.AlarmFeedback> alarmFeedback, List<org.opennms.alec.datasource.api.Situation> situations, List<org.opennms.alec.datasource.api.InventoryObject> inventory)  
      void registerSituationHandler​(org.opennms.alec.datasource.api.SituationHandler handler)
      Passes the reference to the SituationHandler.
      void tick​(long timestampInMillis)  
      • Methods inherited from interface org.opennms.alec.datasource.api.AlarmFeedbackHandler

        handleAlarmFeedback
      • Methods inherited from interface org.opennms.alec.datasource.api.AlarmHandler

        onAlarmCleared, onAlarmCreatedOrUpdated
      • Methods inherited from interface org.opennms.alec.datasource.api.InventoryHandler

        onInventoryAdded, onInventoryRemoved
    • Method Detail

      • init

        void init​(List<org.opennms.alec.datasource.api.Alarm> alarms,
                  List<org.opennms.alec.datasource.api.AlarmFeedback> alarmFeedback,
                  List<org.opennms.alec.datasource.api.Situation> situations,
                  List<org.opennms.alec.datasource.api.InventoryObject> inventory)
      • getTickResolutionMs

        long getTickResolutionMs()
      • tick

        void tick​(long timestampInMillis)
      • destroy

        void destroy()
      • registerSituationHandler

        void registerSituationHandler​(org.opennms.alec.datasource.api.SituationHandler handler)
        Passes the reference to the SituationHandler. The SituationHandler exposes onSituation() callback for creating and updating Situations.
        Parameters:
        handler -
      • deleteSituation

        void deleteSituation​(String situationId)
                      throws InterruptedException
        Delete the situation with the given situation Id.
        Parameters:
        situationId - the situation Id
        Throws:
        InterruptedException - if the thread is interrupted while waiting for the engine to init