Interface AlarmPersisterExtension


  • public interface AlarmPersisterExtension
    This interface allows extensions to modify the alarm after alarmd has created the alarm, or updated it with a reduced event, but before it is persisted. This can be used to add additional logic and set additional fields on the alarms before other processes and components are notified. Implementations must be thread safe since alarmd will issue these callbacks over many threads.
    Author:
    jwhite
    • Method Detail

      • afterAlarmCreated

        void afterAlarmCreated​(OnmsAlarm alarm,
                               Event event,
                               OnmsEvent dbEvent)
        Invoked by the AlarmPersister after the alarm has been created, but *before* the call the save the object via the DAO is made.
        Parameters:
        alarm - the alarm that was created
        event - the event that triggered the alarm
        dbEvent - the database entity associated with the given event
      • afterAlarmUpdated

        void afterAlarmUpdated​(OnmsAlarm alarm,
                               Event event,
                               OnmsEvent dbEvent)
        Invoked by the AlarmPersister after the alarm has been updated, but *before* the call the save the object via the DAO is made.
        Parameters:
        alarm - the alarm that was update
        event - the event that triggered the update to the alarm
        dbEvent - the database entity associated with the given event