class BehaviorMonitor {

   public void handleTimeout(ScheduledEvent event, SubsystemContext<CareSubsystemModel> context) {
      Date eventTime = new Date(event.getScheduledTimestamp());
      List<BehaviorEvaluator> monitoredBehaviors = getEvaluators(context);
      for (BehaviorEvaluator evaluator : monitoredBehaviors){
         try{
            evaluator.onTimeout(event, context);
            if (SubsystemUtils.isMatchingTimeout(event, context, WINDOW_START_KEY.create(evaluator.getBehaviorId()))) {
               context.logger().debug("Window begin for behavior [{}]", evaluator.getCareBehavior());
               beginWindow(evaluator, eventTime, context);
            }else if (SubsystemUtils.isMatchingTimeout(event, context, WINDOW_END_KEY.create(evaluator.getBehaviorId()))) {
               context.logger().debug("Window end for behavior [{}]", evaluator.getCareBehavior());
               endWindow(evaluator, eventTime, context);
            }else if (SubsystemUtils.isMatchingTimeout(event, context, ALERT_KEY.create(evaluator.getBehaviorId()))) {
               context.logger().debug("Alert signal received for behavior [{}]", evaluator.getCareBehavior());
               raiseCareAlert(evaluator, context);
            }
         }catch (Exception e){
            context.logger().warn("An error occurred processing event [{}] for behavior [{}]", event, evaluator.getCareBehavior());
         }
      }
   }

}