本文整理了Java中org.apache.tuscany.sca.monitor.Monitor.reset()
方法的一些代码示例,展示了Monitor.reset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Monitor.reset()
方法的具体详情如下:
包路径:org.apache.tuscany.sca.monitor.Monitor
类名称:Monitor
方法名:reset
[英]Clear context and problems
[中]清晰的背景和问题
代码示例来源: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();
}
}
内容来源于网络,如有侵权,请联系作者删除!