当前位置: 首页>>代码示例>>Java>>正文


Java MetricsFactory.getInstance方法代码示例

本文整理汇总了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");
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:22,代码来源:ConfigXMLReader.java

示例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);
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:34,代码来源:ConfigXMLReader.java

示例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);
            }
        }
 
开发者ID:gildaslemoal,项目名称:elpi,代码行数:39,代码来源:ConfigXMLReader.java

示例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);
    }
}
 
开发者ID:gildaslemoal,项目名称:elpi,代码行数:12,代码来源:ConfigXMLReader.java


注:本文中的org.ofbiz.base.metrics.MetricsFactory.getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。