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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? peermonitorinfo.java

?? jxta平臺的開發包
?? JAVA
字號:
/*
 *  Copyright (c) 2001 Sun Microsystems, Inc.  All rights
 *  reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
 *
 *  1. Redistributions of source code must retain the above copyright
 *  notice, this list of conditions and the following disclaimer.
 *
 *  2. Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in
 *  the documentation and/or other materials provided with the
 *  distribution.
 *
 *  3. The end-user documentation included with the redistribution,
 *  if any, must include the following acknowledgment:
 *  "This product includes software developed by the
 *  Sun Microsystems, Inc. for Project JXTA."
 *  Alternately, this acknowledgment may appear in the software itself,
 *  if and wherever such third-party acknowledgments normally appear.
 *
 *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must
 *  not be used to endorse or promote products derived from this
 *  software without prior written permission. For written
 *  permission, please contact Project JXTA at http://www.jxta.org.
 *
 *  5. Products derived from this software may not be called "JXTA",
 *  nor may "JXTA" appear in their name, without prior written
 *  permission of Sun.
 *
 *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 *  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 *  DISCLAIMED.  IN NO EVENT SHALL SUN MICROSYSTEMS OR
 *  ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 *  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 *  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 *  SUCH DAMAGE.
 *  ====================================================================
 *
 *  This software consists of voluntary contributions made by many
 *  individuals on behalf of Project JXTA.  For more
 *  information on Project JXTA, please see
 *  <http://www.jxta.org/>.
 *
 *  This license is based on the BSD license adopted by the Apache Foundation.
 *
 *  $Id: PeerMonitorInfo.java,v 1.6 2004/09/27 21:46:58 bondolo Exp $
 */

package net.jxta.meter;

import java.net.URI;
import java.util.Enumeration;

import java.net.URISyntaxException;

import net.jxta.document.Element;
import net.jxta.id.IDFactory;
import net.jxta.platform.ModuleClassID;
import net.jxta.util.documentSerializable.DocumentSerializable;
import net.jxta.util.documentSerializable.DocumentSerializableUtilities;
import net.jxta.util.documentSerializable.DocumentSerializationException;

import net.jxta.exception.JxtaException;

/**
  * The Monitoring Capabilities of a Local or Remote Peer as a list of ServiceMonitor ClassIDs and supported Reporting Rates.
  **/ 
public class PeerMonitorInfo implements DocumentSerializable {
	public static final PeerMonitorInfo NO_PEER_MONITOR_INFO = new PeerMonitorInfo(false, null, null, 0, 0);
	private boolean allowsMonitoring;
	private ModuleClassID[] moduleClassIDs;
	private long[] reportRates;
	private long lastResetTime;
	private long runningTime;


	/**
	 * PeerMonitorInfo
	 *
	 */
	public PeerMonitorInfo() {}
	
	/**
	 * PeerMonitorInfo
	 *
	 * @param allowsMonitoring
	 * @param moduleClassIDs
	 * @param reportRates
	 */
	public PeerMonitorInfo(boolean allowsMonitoring, ModuleClassID[] moduleClassIDs, long[] reportRates, long lastResetTime, long runningTime ) {
		this.allowsMonitoring = allowsMonitoring;
		this.moduleClassIDs = moduleClassIDs;
		this.reportRates = reportRates;
		this.lastResetTime = lastResetTime;
		this.runningTime = runningTime;
	}

	/**
	 * Allows Monitoring
	 */
	public boolean allowsMonitoring() { return allowsMonitoring; }

	/**
	 * Get Suported Reporting Rates (in Milliseconds)
	 *
	 * @return long[]
	 */
	public long[] getReportRates() { return reportRates; }

	/**
	 * Get Suported Service Monitors as a list of ModuleClassIDs
	 */
	public ModuleClassID[] getModuleClassIDs() { return moduleClassIDs; }
	
	/**
	 * Get Time that the Monitor was last Reset (probably same as startTime)
	 */
	public long getLastResetTime() { return lastResetTime; }

	/**
	 * Get the running time since the monitor was reset (probably same as upTime)
	 */
	public long getRunningTime() { return runningTime; }

	/**
	  * @inheritDoc
	  **/
	public void serializeTo(Element element) throws DocumentSerializationException {
		DocumentSerializableUtilities.addBoolean(element, "allowsMonitoring", allowsMonitoring);
		DocumentSerializableUtilities.addLong(element, "lastResetTime", lastResetTime);
		DocumentSerializableUtilities.addLong(element, "runningTime", runningTime);

		if (allowsMonitoring) {
			DocumentSerializableUtilities.addInt(element, "numModuleClassIDs", moduleClassIDs.length);
			for (int i = 0; i < moduleClassIDs.length; i++) {
				ModuleClassID moduleClassID = moduleClassIDs[i];
				DocumentSerializableUtilities.addString(element, "moduleClassID", moduleClassID.toString());
			}

			DocumentSerializableUtilities.addInt(element, "numReportRates", reportRates.length);			
			for (int i = 0; i < reportRates.length; i++) {
				long reportRate = reportRates[i];
				DocumentSerializableUtilities.addLong(element, "reportRate", reportRate);
			}
		}				
	}

	/**
	  * @inheritDoc
	  **/
	public void initializeFrom(Element element) throws DocumentSerializationException {
		int numModuleClassIDs = DocumentSerializableUtilities.getInt(element, "numModuleClassIDs", 0);
		moduleClassIDs = new ModuleClassID[numModuleClassIDs];
		int moduleClassIDIndex = 0;		

		int numReportRates = DocumentSerializableUtilities.getInt(element, "numReportRates", 0);
		reportRates = new long[numReportRates];	
		int reportRateIndex = 0;
			
		for (Enumeration e = element.getChildren(); e.hasMoreElements(); ) {
			Element childElement = (Element) e.nextElement();
			String key = (String)childElement.getKey();

			if (key.equals("allowsMonitoring")) 
				allowsMonitoring = DocumentSerializableUtilities.getBoolean(childElement);
			else if (key.equals("lastResetTime")) 
				lastResetTime = DocumentSerializableUtilities.getLong(childElement);
			else if (key.equals("runningTime")) 
				runningTime = DocumentSerializableUtilities.getLong(childElement);
			else if (key.equals("reportRate")) {
				long reportRate = DocumentSerializableUtilities.getLong(childElement);
				reportRates[reportRateIndex] = reportRate;
				reportRateIndex++;
			} else if (key.equals("moduleClassID")) {
				try {
					ModuleClassID moduleClassID = (ModuleClassID) IDFactory.fromURI( new URI(DocumentSerializableUtilities.getString(childElement)) );

					moduleClassIDs[moduleClassIDIndex] = moduleClassID;
					moduleClassIDIndex++;
				} catch(URISyntaxException jex) {
					throw new DocumentSerializationException("Can't get ModuleClassID", jex);
				}
			}
		}
					
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人在线直播| 美国精品在线观看| 日韩你懂的在线观看| 亚洲mv在线观看| 成人小视频免费观看| 亚洲精品一区二区三区精华液 | 加勒比av一区二区| 97成人超碰视| 日本一区二区在线不卡| 日本不卡在线视频| 91精品国产色综合久久ai换脸 | 国产成人日日夜夜| 欧美xxxx在线观看| 开心九九激情九九欧美日韩精美视频电影 | 884aa四虎影成人精品一区| 亚洲综合激情网| 欧美二区在线观看| 国内精品视频一区二区三区八戒| 日韩一二在线观看| 国产激情一区二区三区| 亚洲欧美区自拍先锋| 欧美写真视频网站| 欧美性色黄大片| 99综合电影在线视频| 丰满亚洲少妇av| 日韩精品1区2区3区| 日韩精品一区二区三区中文精品| 亚洲大片精品永久免费| 国模冰冰炮一区二区| 国产亚洲人成网站| 一本一道久久a久久精品综合蜜臀| 国内精品免费在线观看| 精品视频一区 二区 三区| 粉嫩蜜臀av国产精品网站| 日韩高清一区在线| 亚洲高清一区二区三区| 欧美激情在线一区二区| 中文无字幕一区二区三区| 亚洲国产经典视频| 久久久久久久网| 欧美日韩午夜在线| 久久精品久久99精品久久| 欧美国产成人在线| 91精品啪在线观看国产60岁| 狠狠色丁香久久婷婷综合_中| 欧美激情资源网| 欧美色偷偷大香| 国产欧美一区二区精品性色超碰| 9久草视频在线视频精品| 裸体健美xxxx欧美裸体表演| 国产欧美1区2区3区| av一区二区三区黑人| 亚洲一卡二卡三卡四卡| 久久免费看少妇高潮| 欧美精品日韩一区| 91在线小视频| 国产电影精品久久禁18| 午夜不卡av免费| 中文字幕日韩欧美一区二区三区| 欧美mv和日韩mv的网站| 色哟哟一区二区在线观看| 激情文学综合网| 日韩av成人高清| 一区二区激情视频| 日欧美一区二区| 五月综合激情婷婷六月色窝| 经典三级视频一区| 中文字幕亚洲成人| 欧美精品丝袜中出| 欧美猛男gaygay网站| 欧美激情中文字幕| 欧美乱妇15p| 欧美系列一区二区| 日韩欧美一区电影| 国产精品乱人伦| 一区二区三区**美女毛片| 亚洲日本乱码在线观看| 丝袜亚洲另类丝袜在线| 麻豆极品一区二区三区| 91首页免费视频| 色婷婷综合久久久中文字幕| 26uuu精品一区二区| 欧美zozozo| 中文字幕欧美国产| 亚洲精品亚洲人成人网在线播放| 亚洲一区在线电影| 久色婷婷小香蕉久久| 国产成人在线看| 日本精品视频一区二区三区| 色综合欧美在线| 日韩女优av电影| 国产精品电影一区二区三区| 国产三级一区二区| 精品国产一二三区| 樱桃国产成人精品视频| 午夜精品一区在线观看| 男女男精品视频网| 风间由美中文字幕在线看视频国产欧美| 91在线视频在线| 欧美一级爆毛片| 中文字幕一区二区三区在线观看 | 欧美国产激情一区二区三区蜜月 | 成人性生交大片免费| 欧美老年两性高潮| 麻豆国产欧美日韩综合精品二区| 国产精品888| 成人黄色777网| 国产精品午夜春色av| 日韩女优av电影| 色婷婷久久99综合精品jk白丝| 日本精品一级二级| 日韩精品一区二区三区在线| 亚洲综合偷拍欧美一区色| 国产精品一区二区不卡| 日韩三级高清在线| 一区二区日韩av| 99久久精品免费看| 久久先锋资源网| 日本一区二区三区在线观看| 欧美日韩国产另类一区| 久久久久9999亚洲精品| 青青草伊人久久| 欧美午夜精品久久久久久孕妇| 国产精品久久久一区麻豆最新章节| 日韩电影在线免费看| 91久久一区二区| 亚洲尤物视频在线| 色综合色狠狠综合色| 国产精品亲子乱子伦xxxx裸| 丁香激情综合五月| 欧美高清在线视频| 成人爱爱电影网址| 久久久.com| 久久丁香综合五月国产三级网站| 精品久久久久久亚洲综合网 | 中文字幕在线观看一区| 国产在线乱码一区二区三区| 日韩欧美久久久| 国产乱子伦视频一区二区三区 | 国产91在线观看丝袜| 欧美亚洲日本一区| 国产在线一区二区| 午夜精品福利久久久| 国产精品全国免费观看高清 | 天天操天天色综合| 亚洲精品一区二区三区在线观看 | 国产精品乱码一区二三区小蝌蚪| 欧美aⅴ一区二区三区视频| 欧美在线观看视频在线| 日韩精品午夜视频| 欧美日韩中文字幕精品| 蜜臀精品一区二区三区在线观看| 欧美男人的天堂一二区| 亚洲一区二区三区中文字幕在线| 97se亚洲国产综合在线| 成人伦理片在线| 日韩高清不卡在线| 亚洲一线二线三线久久久| 色一情一乱一乱一91av| 亚洲综合一二区| 久久久久久免费网| 欧美性一二三区| 久久国产麻豆精品| 国产精品久久久久久久午夜片 | 91蝌蚪国产九色| 久久国产免费看| 亚洲影视在线播放| 中文字幕一区二区三区四区不卡| 在线综合+亚洲+欧美中文字幕| 国产成a人无v码亚洲福利| 午夜精品123| 亚洲国产你懂的| 日本一区二区综合亚洲| 欧美另类z0zxhd电影| aaa亚洲精品| 国产麻豆精品一区二区| 久久精品国产**网站演员| 亚洲va天堂va国产va久| 一个色在线综合| 亚洲欧美国产三级| 欧美国产在线观看| 国产欧美一区在线| 国产精品国产三级国产aⅴ入口| 精品三级在线看| 国产视频一区在线播放| 亚洲色欲色欲www| 成人免费在线视频| 国产夫妻精品视频| 在线播放日韩导航| 国产精品狼人久久影院观看方式| 婷婷夜色潮精品综合在线| 国产精品综合网| 欧美日韩国产成人在线91 | 婷婷亚洲久悠悠色悠在线播放| 亚洲影院免费观看| 日本一区二区三区四区在线视频| 国产欧美日韩精品a在线观看| 国产精品99久| 欧美mv日韩mv| 色哟哟国产精品|