亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? rrddeftemplate.java

?? httptunnel.jar httptunnel java 源碼
?? JAVA
字號(hào):
/* ============================================================
 * JRobin : Pure java implementation of RRDTool's functionality
 * ============================================================
 *
 * Project Info:  http://www.jrobin.org
 * Project Lead:  Sasa Markovic (saxon@jrobin.org);
 *
 * (C) Copyright 2003, by Sasa Markovic.
 *
 * Developers:    Sasa Markovic (saxon@jrobin.org)
 *                Arne Vandamme (cobralord@jrobin.org)
 *
 * This library is free software; you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by the Free Software Foundation;
 * either version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with this
 * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 */
package net.jumperz.ext.org.jrobin.core;

import org.xml.sax.InputSource;
import org.w3c.dom.Node;

import java.io.IOException;
import java.io.File;
import java.util.GregorianCalendar;

/**
 * Class used to create an arbitrary number of {@link RrdDef} (RRD definition) objects
 * from a single XML template. XML template can be supplied as an XML InputSource,
 * XML file or XML formatted string.<p>
 *
 * Here is an example of a properly formatted XML template with all available
 * options in it (unwanted options can be removed):<p>
 * <pre>
 * &lt;rrd_def&gt;
 *     &lt;path&gt;test.rrd&lt;/path&gt;
 *     &lt;!-- not mandatory --&gt;
 *     &lt;start&gt;1000123456&lt;/start&gt;
 *     &lt;!-- not mandatory --&gt;
 *     &lt;step&gt;300&lt;/step&gt;
 *     &lt;!-- at least one datasource must be supplied --&gt;
 *     &lt;datasource&gt;
 *         &lt;name&gt;input&lt;/name&gt;
 *         &lt;type&gt;COUNTER&lt;/type&gt;
 *         &lt;heartbeat&gt;300&lt;/heartbeat&gt;
 *         &lt;min&gt;0&lt;/min&gt;
 *         &lt;max&gt;U&lt;/max&gt;
 *     &lt;/datasource&gt;
 *     &lt;datasource&gt;
 *         &lt;name&gt;temperature&lt;/name&gt;
 *         &lt;type&gt;GAUGE&lt;/type&gt;
 *         &lt;heartbeat&gt;400&lt;/heartbeat&gt;
 *         &lt;min&gt;U&lt;/min&gt;
 *         &lt;max&gt;1000&lt;/max&gt;
 *     &lt;/datasource&gt;
 *     &lt;!-- at least one archive must be supplied --&gt;
 *     &lt;archive&gt;
 *         &lt;cf&gt;AVERAGE&lt;/cf&gt;
 *         &lt;xff&gt;0.5&lt;/xff&gt;
 *         &lt;steps&gt;1&lt;/steps&gt;
 *         &lt;rows&gt;600&lt;/rows&gt;
 *     &lt;/archive&gt;
 *     &lt;archive&gt;
 *         &lt;cf&gt;MAX&lt;/cf&gt;
 *         &lt;xff&gt;0.6&lt;/xff&gt;
 *         &lt;steps&gt;6&lt;/steps&gt;
 *         &lt;rows&gt;7000&lt;/rows&gt;
 *     &lt;/archive&gt;
 * &lt;/rrd_def&gt;
 * </pre>
 * Notes on the template syntax:<p>
 * <ul>
 * <li>There is a strong relation between the XML template syntax and the syntax of
 * {@link RrdDef} class methods. If you are not sure what some XML tag means, check javadoc
 * for the corresponding class.
 * <li>starting timestamp can be supplied either as a long integer
 * (like: 1000243567) or as an ISO formatted string (like: 2004-02-21 12:25:45)
 * <li>whitespaces are not harmful
 * <li>floating point values: anything that cannot be parsed will be treated as Double.NaN
 * (like: U, unknown, 12r.23)
 * <li>comments are allowed.
 * </ul>
 * Any template value (text between <code>&lt;some_tag&gt;</code> and
 * <code>&lt;/some_tag&gt;</code>) can be replaced with
 * a variable of the following form: <code>${variable_name}</code>. Use
 * {@link XmlTemplate#setVariable(String, String) setVariable()}
 * methods from the base class to replace template variables with real values
 * at runtime.<p>
 *
 * Typical usage scenario:<p>
 * <ul>
 * <li>Create your XML template and save it to a file (template.xml, for example)
 * <li>Replace hardcoded template values with variables if you want to change them during runtime.
 * For example, RRD path should not be hardcoded in the template - you probably want to create
 * many different RRD files from the same XML template. For example, your XML
 * template could start with:
 * <pre>
 * &lt;rrd_def&gt;
 *     &lt;path&gt;${path}&lt;/path&gt;
 *     &lt;step&gt;300&lt;/step&gt;
 *     ...
 * </pre>
 * <li>In your Java code, create RrdDefTemplate object using your XML template file:
 * <pre>
 * RrdDefTemplate t = new RrdDefTemplate(new File(template.xml));
 * </pre>
 * <li>Then, specify real values for template variables:
 * <pre>
 * t.setVariable("path", "demo/test.rrd");
 * </pre>
 * <li>Once all template variables are set, just use the template object to create RrdDef
 * object. This object is actually used to create JRobin RRD files:
 * <pre>
 * RrdDef def = t.getRrdDef();
 * RrdDb rrd = new RrdDb(def);
 * rrd.close();
 * </pre>
 * </ul>
 * You should create new RrdDefTemplate object only once for each XML template. Single template
 * object can be reused to create as many RrdDef objects as needed, with different values
 * specified for template variables. XML synatax check is performed only once - the first
 * definition object gets created relatively slowly, but it will be created much faster next time.
 */
public class RrdDefTemplate extends XmlTemplate {
	/**
	 * Creates RrdDefTemplate object from any parsable XML input source. Read general information
	 * for this class to find an example of a properly formatted RrdDef XML source.
	 * @param xmlInputSource Xml input source
	 * @throws IOException Thrown in case of I/O error
	 * @throws RrdException Thrown in case of XML related error (parsing error, for example)
	 */
	public RrdDefTemplate(InputSource xmlInputSource) throws IOException, RrdException {
		super(xmlInputSource);
	}

	/**
	 * Creates RrdDefTemplate object from the string containing XML template.
	 * Read general information for this class to see an example of a properly formatted XML source.
	 * @param xmlString String containing XML template
	 * @throws IOException Thrown in case of I/O error
	 * @throws RrdException Thrown in case of XML related error (parsing error, for example)
	 */
	public RrdDefTemplate(String xmlString) throws IOException, RrdException {
		super(xmlString);
	}

    /**
	 * Creates RrdDefTemplate object from the file containing XML template.
	 * Read general information for this class to see an example of a properly formatted XML source.
	 * @param xmlFile File object representing file with XML template
	 * @throws IOException Thrown in case of I/O error
	 * @throws RrdException Thrown in case of XML related error (parsing error, for example)
	 */
	public RrdDefTemplate(File xmlFile) throws IOException, RrdException {
		super(xmlFile);
	}

    /**
	 * Returns RrdDef object constructed from the underlying XML template. Before this method
	 * is called, values for all non-optional placeholders must be supplied. To specify
	 * placeholder values at runtime, use some of the overloaded
	 * {@link XmlTemplate#setVariable(String, String) setVariable()} methods. Once this method
	 * returns, all placeholder values are preserved. To remove them all, call inhereted
	 * {@link XmlTemplate#clearValues() clearValues()} method explicitly.<p>
	 *
	 * @return RrdDef object constructed from the underlying XML template,
	 * with all placeholders replaced with real values. This object can be passed to the constructor
	 * of the new RrdDb object.
	 * @throws RrdException Thrown (in most cases) if the value for some placeholder
	 * was not supplied through {@link XmlTemplate#setVariable(String, String) setVariable()}
	 * method call
	 */
	public RrdDef getRrdDef() throws RrdException {
		if (!root.getTagName().equals("rrd_def")) {
			throw new RrdException("XML definition must start with <rrd_def>");
		}
		validateTagsOnlyOnce(root, new String[] {
			"path", "start", "step", "datasource*", "archive*"
		});
		// PATH must be supplied or exception is thrown
		String path = getChildValue(root, "path");
		RrdDef rrdDef = new RrdDef(path);
		try {
			String startStr = getChildValue(root, "start");
			GregorianCalendar startGc = Util.getGregorianCalendar(startStr);
			rrdDef.setStartTime(startGc);
		} catch (RrdException e) {
			// START is not mandatory
		}
		try {
			long step = getChildValueAsLong(root, "step");
			rrdDef.setStep(step);
		} catch (RrdException e) {
			// STEP is not mandatory
		}
		// datsources
		Node[] dsNodes = getChildNodes(root, "datasource");
		for (int i = 0; i < dsNodes.length; i++) {
			validateTagsOnlyOnce(dsNodes[i], new String[] {
				"name", "type", "heartbeat", "min", "max"
			});
			String name = getChildValue(dsNodes[i], "name");
			String type = getChildValue(dsNodes[i], "type");
			long heartbeat = getChildValueAsLong(dsNodes[i], "heartbeat");
			double min = getChildValueAsDouble(dsNodes[i], "min");
			double max = getChildValueAsDouble(dsNodes[i], "max");
			rrdDef.addDatasource(name, type, heartbeat, min, max);
		}
		// archives
		Node[] arcNodes = getChildNodes(root, "archive");
		for (int i = 0; i < arcNodes.length; i++) {
			validateTagsOnlyOnce(arcNodes[i], new String[] {
				"cf", "xff", "steps", "rows"
			});
			String consolFun = getChildValue(arcNodes[i], "cf");
			double xff = getChildValueAsDouble(arcNodes[i], "xff");
			int steps = getChildValueAsInt(arcNodes[i], "steps");
			int rows = getChildValueAsInt(arcNodes[i], "rows");
			rrdDef.addArchive(consolFun, xff, steps, rows);
		}
		return rrdDef;
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区在线| 偷拍自拍另类欧美| 亚洲成人av免费| 国内精品伊人久久久久av影院| 国产suv精品一区二区6| 欧美精品在线观看播放| 久久女同互慰一区二区三区| 一区二区三区日韩精品视频| 国产精品123区| 日韩一区二区在线观看视频| 综合久久综合久久| 成人永久看片免费视频天堂| 精品三级av在线| 日韩国产欧美视频| 欧美色综合久久| 亚洲色图制服丝袜| 成人免费毛片a| 久久这里只有精品6| 日本一道高清亚洲日美韩| 99精品国产视频| 欧美国产日韩在线观看| 免费成人美女在线观看| 欧美日韩国产一区| 午夜精品一区在线观看| 欧美在线观看视频一区二区 | 精品制服美女丁香| 欧美肥大bbwbbw高潮| 一区二区三区在线视频观看58 | 91视频精品在这里| 国产精品天美传媒| 成人美女在线观看| 国产精品视频一二三区| 床上的激情91.| 国产精品毛片久久久久久| 国内一区二区在线| 久久久国际精品| 国产成人鲁色资源国产91色综 | 91精品综合久久久久久| 三级欧美韩日大片在线看| 91国产视频在线观看| 亚洲欧美成aⅴ人在线观看| 一本大道久久a久久综合| 日韩理论片中文av| 在线观看av一区二区| 一区二区三区丝袜| 欧美色成人综合| 日本vs亚洲vs韩国一区三区 | 久久久久综合网| 国产精品综合二区| 国产精品久久久久影院亚瑟| av色综合久久天堂av综合| 国产精品久久久久国产精品日日| 成人av在线一区二区三区| 中文字幕制服丝袜一区二区三区| 99国产精品久久久久久久久久| 亚洲精品一卡二卡| 欧美日韩你懂的| 国产精品一线二线三线精华| 欧美国产1区2区| 日本高清不卡视频| 日韩专区在线视频| 国产欧美日韩亚州综合| 成人一区二区在线观看| 洋洋成人永久网站入口| 91精品国产91久久综合桃花| 国产精品亚洲第一区在线暖暖韩国 | 欧美激情综合网| 色婷婷综合久久久中文一区二区| 亚洲国产成人va在线观看天堂| 91精品国产综合久久久久久久| 麻豆中文一区二区| 综合久久综合久久| 日韩久久久精品| 91丨porny丨国产| 精东粉嫩av免费一区二区三区| 欧美国产精品劲爆| 欧美丰满少妇xxxbbb| 成人v精品蜜桃久久一区| 亚洲一区二区三区影院| 日韩美女视频在线| 欧美性生活大片视频| 国产精品自在在线| 日韩黄色一级片| 亚洲人xxxx| 久久久久九九视频| 51午夜精品国产| 色婷婷精品久久二区二区蜜臂av | 色哟哟精品一区| 国产一区二区导航在线播放| 亚洲午夜久久久久久久久电影院| 国产欧美日本一区二区三区| 欧美系列亚洲系列| 成人黄色电影在线 | 久久久久久99精品| 欧美一级二级在线观看| 色av一区二区| 成人动漫视频在线| 国产成人午夜精品影院观看视频| 亚洲 欧美综合在线网络| 1024成人网| 一区免费观看视频| 久久久久九九视频| 久久久久久夜精品精品免费| 日韩一区二区视频在线观看| 欧美区一区二区三区| 在线精品视频一区二区三四| 国产成人福利片| 久国产精品韩国三级视频| 欧美96一区二区免费视频| 日韩高清在线观看| 亚洲午夜视频在线观看| 亚洲免费资源在线播放| 国产精品久久久久久久蜜臀| 久久精品欧美一区二区三区麻豆| 精品国产一区二区国模嫣然| 69久久99精品久久久久婷婷| 欧美日韩国产综合一区二区 | 91色porny在线视频| 丰满白嫩尤物一区二区| 粉嫩高潮美女一区二区三区| 国产一区二区精品久久| 国产91在线观看| www.av精品| 欧美专区在线观看一区| 69av一区二区三区| 欧美一区二区三区在线观看| 777午夜精品免费视频| 91精品婷婷国产综合久久性色| 欧美亚洲禁片免费| 在线不卡中文字幕播放| 91精品国产一区二区三区蜜臀| 欧美一区二区大片| 精品国产乱码久久久久久图片 | 亚洲午夜在线视频| 偷拍与自拍一区| 国产剧情一区在线| 日本精品一级二级| 日韩美女视频一区二区在线观看| 亚洲精品一区二区三区四区高清 | 精品成人一区二区三区四区| 26uuu亚洲| 中文字幕一区二区三区在线播放 | 亚洲免费视频中文字幕| 亚洲视频中文字幕| 亚洲丶国产丶欧美一区二区三区| 日韩福利电影在线观看| 国产高清不卡二三区| 91免费视频网| 精品久久免费看| 综合久久久久久| 极品少妇一区二区三区精品视频 | 一个色综合av| 午夜精品久久久久久久| 久久精品国产久精国产爱| 99久免费精品视频在线观看| 在线免费观看成人短视频| 久久久久国色av免费看影院| 亚洲一区二区三区爽爽爽爽爽| 国产一区二区精品久久99| 在线免费不卡视频| 亚洲国产成人在线| 青娱乐精品视频在线| 91丨九色porny丨蝌蚪| 久久久综合激的五月天| 亚洲成年人网站在线观看| 丰满亚洲少妇av| 精品捆绑美女sm三区| 亚洲一区av在线| 国产在线国偷精品产拍免费yy| 在线观看91视频| 久久免费看少妇高潮| 亚洲成a人v欧美综合天堂| 成人免费视频视频| 精品理论电影在线观看| 日韩精品免费视频人成| 91在线观看一区二区| 亚洲精品在线免费播放| 日韩精品国产欧美| 欧美日韩视频在线第一区| 亚洲免费av网站| 99久久精品免费看国产| 欧美高清在线精品一区| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 久久久久国产精品麻豆ai换脸| 亚洲综合一区二区精品导航| 国产一区二区女| 欧美一级精品大片| 日韩成人免费电影| 欧美一区二区三区公司| 日本在线观看不卡视频| 欧美丰满少妇xxxbbb| 日本伊人精品一区二区三区观看方式| 欧美系列一区二区| 亚洲国产欧美在线| 欧美日韩不卡在线| 视频一区二区欧美| 日韩免费在线观看| 日韩黄色小视频| 精品久久久久久久久久久久久久久 | 丝袜美腿亚洲色图|