示例#1
0
 /** Execute an automated action. */
 public void execute(final AlarmHandler alarmHandler) {
   new ExecuteActionThread(
           alarmHandler.getScheduledAction(),
           alarmHandler.getInfos(),
           alarmHandler.getCurrentSnapshots())
       .start();
   if (debug) AlarmNotifierHistory.getInstance().addAction(alarmHandler);
 }
示例#2
0
 @Override
 public void run() {
   if (alarmHandler.getStatus().equals(EActionStatus.PENDING)
       || alarmHandler.getStatus().equals(EActionStatus.FORCED)) {
     if (alarmHandler.getStatus().equals(EActionStatus.PENDING))
       alarmHandler.setStatus(EActionStatus.EXECUTED);
     execute(alarmHandler);
   } else {
     if (debug) AlarmNotifierHistory.getInstance().addAction(alarmHandler);
     Activator.getLogger()
         .log(
             Level.INFO,
             "CANCEL " + alarmHandler.getInfos() + " because " + alarmHandler.getReason());
   }
   remove(this.alarmHandler);
 }