本文整理汇总了Java中org.ofbiz.base.metrics.MetricsFactory.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java MetricsFactory.getInstance方法的具体用法?Java MetricsFactory.getInstance怎么用?Java MetricsFactory.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.ofbiz.base.metrics.MetricsFactory
的用法示例。
在下文中一共展示了MetricsFactory.getInstance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Event
import org.ofbiz.base.metrics.MetricsFactory; //导入方法依赖的package包/类
public Event(Element eventElement) {
this.type = eventElement.getAttribute("type");
this.path = eventElement.getAttribute("path");
this.invoke = eventElement.getAttribute("invoke");
this.globalTransaction = !"false".equals(eventElement.getAttribute("global-transaction"));
// Get metrics.
Element metricsElement = UtilXml.firstChildElement(eventElement, "metric");
if (metricsElement != null) {
this.metrics = MetricsFactory.getInstance(metricsElement);
}
// SCIPIO: new attribs
String transStr = eventElement.getAttribute("transaction");
if ("true".equals(transStr)) {
transaction = Boolean.TRUE;
} else if ("false".equals(transStr)) {
transaction = Boolean.FALSE;
} else {
transaction = null;
}
this.abortTransaction = eventElement.getAttribute("abort-transaction");
}
示例2: RequestMap
import org.ofbiz.base.metrics.MetricsFactory; //导入方法依赖的package包/类
public RequestMap(Element requestMapElement) {
// Get the URI info
this.uri = requestMapElement.getAttribute("uri");
this.edit = !"false".equals(requestMapElement.getAttribute("edit"));
this.trackServerHit = !"false".equals(requestMapElement.getAttribute("track-serverhit"));
this.trackVisit = !"false".equals(requestMapElement.getAttribute("track-visit"));
// Check for security
Element securityElement = UtilXml.firstChildElement(requestMapElement, "security");
if (securityElement != null) {
this.securityHttps = "true".equals(securityElement.getAttribute("https"));
this.securityAuth = "true".equals(securityElement.getAttribute("auth"));
this.securityCert = "true".equals(securityElement.getAttribute("cert"));
this.securityExternalView = !"false".equals(securityElement.getAttribute("external-view"));
this.securityDirectRequest = !"false".equals(securityElement.getAttribute("direct-request"));
}
// Check for event
Element eventElement = UtilXml.firstChildElement(requestMapElement, "event");
if (eventElement != null) {
this.event = new Event(eventElement);
}
// Check for description
this.description = UtilXml.childElementValue(requestMapElement, "description");
// Get the response(s)
for (Element responseElement : UtilXml.childElementList(requestMapElement, "response")) {
RequestResponse response = new RequestResponse(responseElement);
requestResponseMap.put(response.name, response);
}
// Get metrics.
Element metricsElement = UtilXml.firstChildElement(requestMapElement, "metric");
if (metricsElement != null) {
this.metrics = MetricsFactory.getInstance(metricsElement);
}
}
示例3: RequestMap
import org.ofbiz.base.metrics.MetricsFactory; //导入方法依赖的package包/类
public RequestMap(Element requestMapElement) {
// Get the URI info
this.uri = requestMapElement.getAttribute("uri");
this.edit = !"false".equals(requestMapElement.getAttribute("edit"));
this.trackServerHit = !"false".equals(requestMapElement.getAttribute("track-serverhit"));
this.trackVisit = !"false".equals(requestMapElement.getAttribute("track-visit"));
// Check for security
Element securityElement = UtilXml.firstChildElement(requestMapElement, "security");
if (securityElement != null) {
this.securityHttps = "true".equals(securityElement.getAttribute("https"));
this.securityAuth = "true".equals(securityElement.getAttribute("auth"));
this.securityCert = "true".equals(securityElement.getAttribute("cert"));
this.securityExternalView = !"false".equals(securityElement.getAttribute("external-view"));
this.securityDirectRequest = !"false".equals(securityElement.getAttribute("direct-request"));
}
// Check for event
Element eventElement = UtilXml.firstChildElement(requestMapElement, "event");
if (eventElement != null) {
this.event = new Event(eventElement);
}
// Check for description
this.description = UtilXml.childElementValue(requestMapElement, "description");
// Get the response(s)
for (Element responseElement: UtilXml.childElementList(requestMapElement, "response")) {
RequestResponse response = new RequestResponse(responseElement);
requestResponseMap.put(response.name, response);
}
// Get metrics.
Element metricsElement = UtilXml.firstChildElement(requestMapElement, "metric");
if (metricsElement != null) {
this.metrics = MetricsFactory.getInstance(metricsElement);
}
}
示例4: Event
import org.ofbiz.base.metrics.MetricsFactory; //导入方法依赖的package包/类
public Event(Element eventElement) {
this.type = eventElement.getAttribute("type");
this.path = eventElement.getAttribute("path");
this.invoke = eventElement.getAttribute("invoke");
this.globalTransaction = !"false".equals(eventElement.getAttribute("global-transaction"));
// Get metrics.
Element metricsElement = UtilXml.firstChildElement(eventElement, "metric");
if (metricsElement != null) {
this.metrics = MetricsFactory.getInstance(metricsElement);
}
}