/**
  * Called when the SOAP trigger ends.
  *
  * @param startTime Trigger time from the onTriggerStart() method.
  */
 public void onTriggerEnd(long startTime) {
   try {
     if (initialized) {
       triggerTime.finish(startTime);
     }
   } catch (Exception e) {
     LOG.log(Severity.WARN, "Error while updating a JMX counter.", e);
   }
 }
  /**
   * Called when the file processing ends.
   *
   * @param success <code>true</code> if the processing succeeded.
   * @param startTime Processing start time from the onProcessingStart() method.
   */
  public void onProcessingEnd(boolean success, long startTime) {
    try {
      if (initialized) {
        if (success) {
          successfulFileCount.addEvent();
        } else {
          errorFileCount.addEvent();
        }

        totalFileCount.addEvent();
        processingTime.finish(startTime);
      }
    } catch (Exception e) {
      LOG.log(Severity.WARN, "Error while updating a JMX counter.", e);
    }
  }