本文整理了Java中org.apache.tuscany.sca.monitor.Monitor
类的一些代码示例,展示了Monitor
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Monitor
类的具体详情如下:
包路径:org.apache.tuscany.sca.monitor.Monitor
类名称:Monitor
[英]A monitor for the watching for validation problems
[中]用于监视验证问题的监视器
代码示例来源:origin: org.apache.tuscany.sca/tuscany-contribution
private void error(Monitor monitor, String message, Object model, Exception ex) {
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
"contribution-validation-messages",
Severity.ERROR,
model,
message,
ex);
monitor.problem(problem);
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-contribution
/**
* Report a exception.
*
* @param problems
* @param message
* @param model
*/
private void error(Monitor monitor, String message, Object model, Throwable ex) {
Monitor.error(monitor, this, "contribution-validation-messages", message, ex);
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
/**
* Report a warning.
*
* @param monitor
* @param problems
* @param message
* @param model
*/
protected void warning(Monitor monitor, String message, Object model, Object... messageParameters) {
Monitor.warning(monitor, this, Messages.BUILDER_VALIDATION_BUNDLE, message, messageParameters);
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
monitor.pushContext("Composite: " + composite.getName().toString());
try {
monitor.pushContext("Component: " + component.getName());
monitor.popContext();
monitor.popContext();
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-wsdlgen
/**
* Report a fatal error.
* @param message
* @param binding
* @param exception
*/
private static void fatal(Monitor monitor, String message, WebServiceBinding wsBinding, String... messageParameters) {
Problem problem = monitor.createProblem(BindingWSDLGenerator.class.getName(), "wsdlgen-validation-messages", Severity.ERROR,wsBinding, message, (Object[])messageParameters);
throw new WSDLGenerationException(problem.toString(), null, problem);
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
monitor.pushContext("Component: " + component.getName().toString());
monitor.pushContext("Service: " + service.getName());
Monitor.error(monitor,
this,
BUILDER_VALIDATION_BUNDLE,
monitor.popContext();
monitor.popContext();
代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl
resolver.addModel(wsdlInterface, context);
} catch (InvalidInterfaceException e) {
String message = context.getMonitor().getMessageString(WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages",
"InvalidInterface");
message = message.replace("{0}", portType.toString());
ContributionResolveException ce = new ContributionResolveException(message, e);
Monitor.error(monitor, WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages", "ContributionResolveException",
wsdlFactory.getClass().getName(), ce.getMessage());
Monitor.warning(monitor, WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages", "WsdlInterfaceDoesNotMatch",
wsdlDefinition.getNamespace(), wsdlInterface.getName().toString() );
String message = context.getMonitor().getMessageString(WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages",
"WSDLDefinitionUnresolved");
message = message.replace("{0}", wsdlInterface.getName().toString());
ContributionResolveException ce = new ContributionResolveException(message);
Monitor.error(monitor, WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages", "ContributionResolveException",
wsdlFactory.getClass().getName(), ce.getMessage());
代码示例来源:origin: org.apache.tuscany.sca/tuscany-assembly-xml
public void resolve(Composite composite, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
try {
if (composite != null)
extensionProcessor.resolve(composite, resolver, context);
} catch (Throwable e ) {
// Add information about which composite was being processed when the exception occurred
String newMessage = context.getMonitor().getMessageString(CompositeDocumentProcessor.class.getName(),
Messages.RESOURCE_BUNDLE,
"ProcessingComposite") +
" " +
composite.getName() + ": " + e.getMessage();
throw new ContributionResolveException( newMessage, e );
} // end try
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-contribution
Contribution old = context.setContribution(contribution);
try {
monitor.pushContext("Contribution: " + contribution.getURI());
String message = context.getMonitor().getMessageString(ContributionContentProcessor.class.getName(),
"contribution-xml-validation-messages",
"ExportedPackageNotFound");
monitor.popContext();
context.setContribution(old);
代码示例来源:origin: org.apache.tuscany.sca/tuscany-builder
Monitor.error(monitor,
this,
BUILDER_VALIDATION_BUNDLE,
Monitor.warning(monitor,
this,
BUILDER_VALIDATION_BUNDLE,
代码示例来源:origin: org.apache.tuscany.sca/tuscany-assembly-xml
monitor.setArtifactName(uri.toString());
ContributionReadException ce = new ContributionReadException(context.getMonitor().getMessageString(CompositeDocumentProcessor.class.getName(),
Messages.RESOURCE_BUNDLE,
"ReadException") +
代码示例来源:origin: org.apache.tuscany.sca/tuscany-builder
monitor.pushContext("Composite: " + composite.getName().toString());
try {
monitor.pushContext("Component: " + component.getName());
monitor.popContext();
monitor.popContext();
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
/**
* Report a fatal error.
* @param message
* @param binding
* @param parameters
*/
private void fatal(String message, Interface interfaze, String... messageParameters) {
Problem problem = monitor.createProblem(this.getClass().getName(), "wsdlgen-validation-messages", Severity.ERROR, interfaze, message, (Object[])messageParameters);
throw new WSDLGenerationException(problem.toString(), null, problem);
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-builder
monitor.pushContext("Component: " + component.getName().toString());
monitor.pushContext("Service: " + service.getName());
Monitor.error(monitor,
this,
BUILDER_VALIDATION_BUNDLE,
monitor.popContext();
monitor.popContext();
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
resolver.addModel(wsdlInterface, context);
} catch (InvalidInterfaceException e) {
String message = context.getMonitor().getMessageString(WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages",
"InvalidInterface");
message = message.replace("{0}", portType.toString());
ContributionResolveException ce = new ContributionResolveException(message, e);
Monitor.error(monitor, WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages", "ContributionResolveException",
wsdlFactory.getClass().getName(), ce.getMessage());
Monitor.warning(monitor, WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages", "WsdlInterfaceDoesNotMatch",
wsdlDefinition.getNamespace(), wsdlInterface.getName().toString() );
String message = context.getMonitor().getMessageString(WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages",
"WSDLDefinitionUnresolved");
message = message.replace("{0}", wsdlInterface.getName().toString());
ContributionResolveException ce = new ContributionResolveException(message);
Monitor.error(monitor, WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages", "ContributionResolveException",
wsdlFactory.getClass().getName(), ce.getMessage());
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
public void resolve(Composite composite, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
try {
if (composite != null)
extensionProcessor.resolve(composite, resolver, context);
} catch (Throwable e ) {
// Add information about which composite was being processed when the exception occurred
String newMessage = context.getMonitor().getMessageString(CompositeDocumentProcessor.class.getName(),
Messages.RESOURCE_BUNDLE,
"ProcessingComposite") +
" " +
composite.getName() + ": " + e.getMessage();
throw new ContributionResolveException( newMessage, e );
} // end try
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
Contribution old = context.setContribution(contribution);
try {
monitor.pushContext("Contribution: " + contribution.getURI());
String message = context.getMonitor().getMessageString(ContributionContentProcessor.class.getName(),
"contribution-xml-validation-messages",
"ExportedPackageNotFound");
monitor.popContext();
context.setContribution(old);
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
Monitor.error(monitor,
this,
BUILDER_VALIDATION_BUNDLE,
Monitor.warning(monitor,
this,
BUILDER_VALIDATION_BUNDLE,
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
monitor.setArtifactName(uri.toString());
ContributionReadException ce = new ContributionReadException(context.getMonitor().getMessageString(CompositeDocumentProcessor.class.getName(),
Messages.RESOURCE_BUNDLE,
"ReadException") +
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
private void warning(Monitor monitor, String message, Object model, Object... messageParameters) {
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
"impl-widget-validation-messages",
Severity.WARNING,
model,
message,
(Object[])messageParameters);
monitor.problem(problem);
}
}
内容来源于网络,如有侵权,请联系作者删除!