本文整理了Java中org.apache.tuscany.sca.monitor.Monitor.analyzeProblems()
方法的一些代码示例,展示了Monitor.analyzeProblems()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Monitor.analyzeProblems()
方法的具体详情如下:
包路径:org.apache.tuscany.sca.monitor.Monitor
类名称:Monitor
方法名:analyzeProblems
[英]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.
[中]检查监视器是否存在严重错误,如果发现问题,则抛出ValidationException。这也将在此监视器上调用reset()。
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
public Object loadXMLDocument(Reader document) throws XMLStreamException, ContributionReadException, ValidationException {
Monitor monitor = createMonitor();
Object model = loadXMLDocument(document, monitor);
monitor.analyzeProblems();
return model;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
return deployer.getDependencies(contributionMetaDatas, contributionURI, monitor);
} finally {
monitor.analyzeProblems();
代码示例来源:origin: org.apache.tuscany.sca/tuscany-domain-node
return deployer.getDependencies(contributionMetaDatas, contributionURI, monitor);
} finally {
monitor.analyzeProblems();
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
protected void mergeContributionMetaData(String metaDataURL, Contribution contribution) throws ValidationException {
ContributionMetadata metaData;
Monitor monitor = deployer.createMonitor();
try {
metaData = deployer.loadXMLDocument(IOHelper.getLocationAsURL(metaDataURL), monitor);
} catch (Exception e) {
throw new ValidationException(e);
}
monitor.analyzeProblems();
contribution.mergeMetaData(metaData);
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-domain-node
protected void mergeContributionMetaData(String metaDataURL, Contribution contribution) throws ValidationException {
ContributionMetadata metaData;
Monitor monitor = deployer.createMonitor();
try {
metaData = deployer.loadXMLDocument(IOHelper.getLocationAsURL(metaDataURL), monitor);
} catch (Exception e) {
throw new ValidationException(e);
}
monitor.analyzeProblems();
contribution.mergeMetaData(metaData);
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
public void validateContribution(String contributionURI) throws ContributionReadException, ValidationException {
ContributionDescription cd = getInstalledContribution(contributionURI);
Contribution contribution = loadContribution(cd);
Monitor monitor = deployer.createMonitor();
try {
ArrayList<Contribution> cs = new ArrayList<Contribution>();
cs.add(contribution);
cs.addAll(calculateDependentContributions(cd));
deployer.resolve(cs, null, monitor);
} catch (Exception e) {
loadedContributions.remove(cd.getURI());
throw new RuntimeException(e);
}
try {
monitor.analyzeProblems();
} catch (ValidationException e) {
loadedContributions.remove(cd.getURI());
throw e;
}
if (contribution.getClassLoader() == null && contribution.getModelResolver() instanceof ExtensibleModelResolver) {
ModelResolver o = ((ExtensibleModelResolver)contribution.getModelResolver()).getModelResolverInstance(ClassReference.class);
if (o instanceof ClassLoader) {
contribution.setClassLoader((ClassLoader)o);
}
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
monitor.analyzeProblems();
代码示例来源:origin: org.apache.tuscany.sca/tuscany-domain-node
public void validateContribution(String contributionURI) throws ContributionReadException, ValidationException {
ContributionDescription cd = getInstalledContribution(contributionURI);
Contribution contribution = loadContribution(cd);
Monitor monitor = deployer.createMonitor();
try {
ArrayList<Contribution> cs = new ArrayList<Contribution>();
cs.add(contribution);
cs.addAll(calculateDependentContributions(cd));
deployer.resolve(cs, null, monitor);
} catch (Exception e) {
loadedContributions.remove(cd.getURI());
throw new RuntimeException(e);
}
try {
monitor.analyzeProblems();
} catch (ValidationException e) {
loadedContributions.remove(cd.getURI());
throw e;
}
if (contribution.getClassLoader() == null && contribution.getModelResolver() instanceof ExtensibleModelResolver) {
ModelResolver o = ((ExtensibleModelResolver)contribution.getModelResolver()).getModelResolverInstance(ClassReference.class);
if (o instanceof ClassLoader) {
contribution.setClassLoader((ClassLoader)o);
}
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-domain-node
monitor.analyzeProblems();
内容来源于网络,如有侵权,请联系作者删除!