org.apache.tuscany.sca.monitor.Monitor.getProblems()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(135)

本文整理了Java中org.apache.tuscany.sca.monitor.Monitor.getProblems()方法的一些代码示例,展示了Monitor.getProblems()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Monitor.getProblems()方法的具体详情如下:
包路径:org.apache.tuscany.sca.monitor.Monitor
类名称:Monitor
方法名:getProblems

Monitor.getProblems介绍

[英]Returns a list of reported problems.
[中]返回报告的问题列表。

代码示例

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

public boolean isErrorDetected() {
  
  boolean errorDetected = false;
  
  for (Problem problem : getProblems()) {
    if ((problem.getSeverity() == Severity.ERROR)) {
      errorDetected = true;
      break;
    }
  }
  
  return errorDetected;
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-monitor

public boolean isErrorDetected() {
  
  boolean errorDetected = false;
  
  for (Problem problem : getProblems()) {
    if ((problem.getSeverity() == Severity.ERROR)) {
      errorDetected = true;
      break;
    }
  }
  
  return errorDetected;
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-node-impl

/**
 * Analyze problems reported by the artifact processors and builders.
 *
 * @throws Exception
 */
private void analyzeProblems(Monitor monitor) throws Throwable {
  try {
    for (Problem problem : monitor.getProblems()) {
      if ((problem.getSeverity() == Severity.ERROR)) {
        if (problem.getCause() != null) {
          throw problem.getCause();
        } else {
          throw new ServiceRuntimeException(problem.toString());
        }
      }
    }
  } finally {
    // FIXME: Clear problems so that the monitor is clean again
    monitor.reset();
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

/**
 * Analyze problems reported by the artifact processors and builders.
 *
 * @throws Exception
 */
private void analyzeProblems(Monitor monitor) throws Throwable {
  try {
    for (Problem problem : monitor.getProblems()) {
      if ((problem.getSeverity() == Severity.ERROR)) {
        if (problem.getCause() != null) {
          throw problem.getCause();
        } else {
          throw new ServiceRuntimeException(problem.toString());
        }
      }
    }
  } finally {
    // FIXME: Clear problems so that the monitor is clean again
    monitor.reset();
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-monitor

/**
 * Checks the Monitor for any Problems with s severity of ERROR and
 * if one is found then throw a ValidationException.
 * This will also call reset() on this Monitor.
 */
public void analyzeProblems() throws ValidationException {
  try {
    for (Problem problem : getProblems()) {
      if ((problem.getSeverity() == Severity.ERROR)) {
        if (problem.getCause() != null) {
          throw new ValidationException(problem.getCause());
        } else {
          throw new ValidationException(problem.toString());
        }
      }
    }
  } finally {
    reset();
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

/**
 * Checks the Monitor for any Problems with s severity of ERROR and
 * if one is found then throw a ValidationException.
 * This will also call reset() on this Monitor.
 */
public void analyzeProblems() throws ValidationException {
  try {
    for (Problem problem : getProblems()) {
      if ((problem.getSeverity() == Severity.ERROR)) {
        if (problem.getCause() != null) {
          throw new ValidationException(problem.getCause());
        } else {
          throw new ValidationException(problem.toString());
        }
      }
    }
  } finally {
    reset();
  }
}

相关文章