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

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

?? restopeer.java

?? 冒險島游戲的flash版本的函數
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
import java.io.*;import java.util.*;import java.net.URL; import net.jxta.peergroup.PeerGroup;import net.jxta.peergroup.PeerGroupFactory;import net.jxta.peergroup.PeerGroupID;import net.jxta.exception.PeerGroupException;import net.jxta.discovery.DiscoveryService;import net.jxta.document.AdvertisementFactory;import net.jxta.document.Advertisement;import net.jxta.document.Element;import net.jxta.document.MimeMediaType;import net.jxta.document.StructuredTextDocument;import net.jxta.document.StructuredDocumentFactory;import net.jxta.document.StructuredDocument;import net.jxta.document.StructuredDocumentUtils;import net.jxta.pipe.PipeService;import net.jxta.pipe.PipeID;import net.jxta.protocol.PipeAdvertisement;import net.jxta.protocol.PeerGroupAdvertisement;import net.jxta.protocol.ModuleSpecAdvertisement;import net.jxta.protocol.ModuleImplAdvertisement;import net.jxta.id.IDFactory;import net.jxta.id.ID;import net.jxta.platform.ModuleClassID;import net.jxta.platform.ModuleSpecID;import net.jxta.impl.peergroup.StdPeerGroupParamAdv;// RestoPeer represents a restaurant that receives auction requests// for french fries from HungryPeers. RestoPeers offers three sizes of// french fries (small, large, medium). Each restaurant assignes a// different price to each size. Each restaurant also offers a special// offering.//// Each resturant is uniquely identified by its brand name.//public class RestoPeer {    private PeerGroup netpg = null;      // The NetPeerGroup    private PeerGroup restoNet = null;   // The restoNet Peergroup    private String brand = "Chez JXTA";        // Brand of this restaurant    // Services within the RestoNet peergroup    private DiscoveryService disco = null;  // Discovery service    private PipeService pipes = null;       // Pipe service    private PipeAdvertisement myAdv = null; // My RestoPeer pipe advertisement    private int timeout = 3000;          // discovery wait timeout    // IDs within RestoNet    private ModuleClassID mcID = IDFactory.newModuleClassID();    private ModuleSpecID  msID = IDFactory.newModuleSpecID(mcID);    private static PeerGroupID restoPeerGroupID;   // main method to start our RestoPeer    public static void main(String args[]) {	RestoPeer myapp = new RestoPeer();	myapp.startJxta();	System.exit(0);    }        // Method to start the JXTA platform, join the RestoNet peergroup and    // advertise the RestoPeer service    private void startJxta() {        try {            //Discover and join (or start) the default peergroup            netpg = PeerGroupFactory.newNetPeerGroup();        } catch (PeerGroupException e) {            //Couldn't initialize; can't continue            System.out.println("Fatal error : creating the NetPeerGroup");            System.exit(1);        }        // Discover (or create) and join the RestoNet peergroup        try {            joinRestoNet();        } catch (Exception e) {            System.out.println("Can't join or create RestoNet");            System.exit(1);        }        // Wait while we process requests        synchronized(RestoPeer.class) {            try {                RestoPeer.class.wait();	    } catch (InterruptedException ie) {	        System.out.println("Interrupted; exiting");	    }        }    }        // Discover (or create) and join the RestoNet peergroup    private void joinRestoNet() throws Exception {        int count = 3;   // maximun number of attempts to discover        System.out.println("Attempting to Discover the RestoNet PeerGroup");        // Get the discovery service from the NetPeergroup        DiscoveryService hdisco = netpg.getDiscoveryService();        Enumeration ae = null;   // Holds the discovered peers        // Loop until wediscover the RestoNet or        // until we've exhausted the desired number of attempts        while (count-- > 0) {            try {                // search first in the peer local cache to find                // the RestoNet peergroup advertisement                ae = hdisco.getLocalAdvertisements(DiscoveryService.GROUP,                                          "Name", "RestoNet");                // If we found the RestoNet advertisement we are done                if ((ae != null) && ae.hasMoreElements())                    break;                // If we did not find it, we send a discovery request                hdisco.getRemoteAdvertisements(null,                       DiscoveryService.GROUP, "Name", "RestoNet", 1, null);                // Sleep to allow time for peers to respond to the                // discovery request                try {                    Thread.sleep(timeout);                } catch (InterruptedException ie) {}            } catch (IOException e){                // Found nothing! Move on            }        }        PeerGroupAdvertisement restoNetAdv = null;        // Check if we found the RestoNet advertisement.        // If we didn't, then either        //       we are the first peer to join or        //       no other RestoNet peers are up.        // In either case, we must create the RestoNet peergroup        if (ae == null || !ae.hasMoreElements()) {            System.out.println(                 "Could not find the RestoNet peergroup; creating one");            try {		// Create the RestoNetPeerGroup		restoNet = createRestoPeerGroup();				// Get the PeerGroup Advertisement		restoNetAdv = netpg.getPeerGroupAdvertisement();            } catch (Exception e) {                System.out.println("Error in creating RestoNet Peergroup");                throw e;            }        } else {            // The RestoNet advertisement was found in the cache;            // that means we can join the existing RestoNet peergroup            try {                restoNetAdv = (PeerGroupAdvertisement) ae.nextElement();                restoNet = netpg.newGroup(restoNetAdv);                System.out.println(                    "Found the RestoNet Peergroup advertisement");            } catch (Exception e) {                System.out.println("Error in creating RestoNet PeerGroup from existing adv");                throw e;            }        }        try {            // Get the discovery and pipe services for the RestoNet Peergroup            disco = restoNet.getDiscoveryService();            pipes = restoNet.getPipeService();        } catch (Exception e) {            System.out.println("Error getting services from RestoNet");            throw e;        }        System.out.println("RestoNet Restaurant (" + brand + ") is on-line");        return;    }    // This method is used to create a new instance of    // the RestoNet peergroup.    // Peergroups are implemented as modules.    // Modules are used in JXTA  to load and manage dynamic code on a peer.    //    // A peergroup is represented by a set of advertisements:     //  1) A peergroup advertisement that advertises the peergroup    //  2) A module spec advertisement that uniquely    //         specifies the peergroup (set of peergroup services)    //  3) A module impl advertisement that describes a    //         peergroup implementation    // This method must create all these advertisements    private PeerGroup createRestoPeerGroup() {	// Use a unique PeerGroup id as a constant so that the same	// peergroup ID is used each time the RestoNet Peergroup is created.	// It is essential that each RestoPeer use the same unique ID	// so that two peers do not create different IDs for the	// RestoNet peergroup. 	//	// The UUID in the URL constructor was generated via the	// Shell mkpgrp command that created a new peergroup with a	// unique peergroup ID.        try {            restoPeerGroupID = (PeerGroupID) IDFactory.fromURL(                  new URL("urn", "",                          "jxta:uuid-4d6172676572696e204272756e6f202002"));        } catch (java.net.MalformedURLException e) {            System.err.println("Can't create restoPeerGroupID: " + e);            System.exit(1);        } catch (java.net.UnknownServiceException e) {            System.err.println("Can't create restoPeerGroupID: " + e);            System.exit(1);        }	// Create a new Module Implementation advertisement that will	// represent the new RestoPeer peergroup service	// Assign a new SpecID that uniquely identifies the RestoPeer	// peergroup service. Ths spec ID must be shared between all	// instances of the RestoNet peergroup; it again is created via	// the mkpgrp Shell command.	ModuleSpecID  msrvID = null;	try {	    msrvID = (ModuleSpecID) IDFactory.fromURL(new URL("urn","",		"jxta:uuid-737D1ED776B043E7A8718B102B62055A614CAC047AD240A8960ABDE6F7847C2306"));	} catch (java.net.MalformedURLException e) {             System.err.println("Can't create restoPeer Spec Id:" + e);            System.exit(1);        } catch (java.net.UnknownServiceException e) {            System.err.println("Can't create restoPeer Spec Id:" + e);            System.exit(1);        }        	// Create a pipe advertisement to be used by Hungry Peers	// to communicate with the RestoNet peergroup service	PipeAdvertisement myAdv = (PipeAdvertisement)	    AdvertisementFactory.newAdvertisement(	    PipeAdvertisement.getAdvertisementType());			// Again we assign a hardwired ID to the pipe, so everytime a	// peer recreates the RestoNet peergroup, the same pipe id	// is used.	try {	    myAdv.setPipeID((PipeID) IDFactory.fromURL(new URL("urn","",              "jxta:uuid-9CCCDF5AD8154D3D87A391210404E59BE4B888209A2241A4A162A10916074A9504")));	} catch (java.net.MalformedURLException e) {            System.err.println("Can't create restoPeer PipeID: " + e);            System.exit(1);        } catch (java.net.UnknownServiceException e) {            System.err.println(" Can't create restoPeer PipeID: " + e);            System.exit(1);        }        	// The symbolic name of the pipe is built from

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色屁屁一区二区| 成人av网站大全| 国产精品久久三区| 欧美精品久久久久久久多人混战| 国产一区二区三区四区五区美女| 亚洲视频一区在线| 久久夜色精品国产欧美乱极品| 色天使久久综合网天天| 精品一区二区三区免费视频| 一区二区三区在线观看视频| 久久先锋资源网| 欧美一级午夜免费电影| 91原创在线视频| 国产99精品视频| 成人av动漫在线| 久久精品久久99精品久久| 亚洲三级电影全部在线观看高清| 精品国产伦一区二区三区观看体验 | a亚洲天堂av| 麻豆视频一区二区| 亚洲成av人片在线| 亚洲精选视频免费看| 国产精品久久免费看| 亚洲精品一区二区三区99| 欧美久久久久久久久| 91视视频在线观看入口直接观看www| 国产成人亚洲精品青草天美| 另类的小说在线视频另类成人小视频在线| 亚洲男人的天堂在线aⅴ视频| 日本一区二区三区久久久久久久久不| 欧美一区二区三区小说| 337p亚洲精品色噜噜噜| 在线中文字幕一区二区| 97精品国产露脸对白| 成人黄色小视频在线观看| 国产成人综合在线观看| 国产乱码精品一区二区三区五月婷 | 亚洲欧美日韩国产手机在线| 亚洲国产精品黑人久久久| 久久网站热最新地址| 精品国产乱码久久久久久夜甘婷婷| 欧美美女网站色| 在线电影院国产精品| 欧美日韩国产高清一区| 欧美日韩大陆在线| 欧美精品久久天天躁| 777欧美精品| 日韩欧美一区二区视频| 精品国产乱码久久久久久老虎 | 一区二区三区加勒比av| 亚洲综合精品久久| 天天色图综合网| 日本视频免费一区| 久久不见久久见免费视频1| 久久国产免费看| 国产精品主播直播| 成人av午夜影院| 色激情天天射综合网| 欧美日韩综合在线免费观看| 欧美一区二区三区在线视频| 久久免费精品国产久精品久久久久| 久久精品欧美一区二区三区麻豆| 国产精品区一区二区三区| 国产精品国产三级国产专播品爱网| 亚洲日本在线看| 丝袜美腿亚洲色图| 国产一区二区三区免费看| 成人高清伦理免费影院在线观看| 日本高清成人免费播放| 91精品国产91久久久久久一区二区 | 成人精品视频.| 色婷婷国产精品综合在线观看| 欧美性色黄大片手机版| 日韩精品一区在线观看| 国产精品视频九色porn| 亚洲国产一区二区在线播放| 久久精品久久99精品久久| 99麻豆久久久国产精品免费优播| 欧美日韩另类国产亚洲欧美一级| 2欧美一区二区三区在线观看视频| 中文字幕中文字幕一区| 视频一区中文字幕国产| 国产99精品在线观看| 欧美日韩在线直播| 久久综合精品国产一区二区三区| 综合激情网...| 久久99精品一区二区三区| 91在线观看地址| 欧美精品一区二区久久婷婷| 亚洲免费毛片网站| 国产在线精品不卡| 欧美午夜精品一区二区蜜桃 | 国产精品免费视频网站| 亚洲r级在线视频| a4yy欧美一区二区三区| 日韩一级视频免费观看在线| 日韩伦理av电影| 国产乱对白刺激视频不卡| 精品视频一区二区不卡| 国产欧美日韩一区二区三区在线观看 | 国产精品天干天干在观线| 免费在线观看视频一区| 91亚洲精品乱码久久久久久蜜桃| 精品国产一区二区三区av性色| 亚洲日本成人在线观看| 国产精品一区二区果冻传媒| 欧美美女一区二区在线观看| 亚洲精品欧美专区| 成人免费黄色在线| 精品国产人成亚洲区| 亚洲成人精品影院| 一本色道**综合亚洲精品蜜桃冫| 久久综合九色综合97婷婷女人 | 一区av在线播放| 99国产精品99久久久久久| 久久亚区不卡日本| 久久精品久久99精品久久| 欧美日韩久久一区二区| 蜜臀91精品一区二区三区| 91色porny| 亚洲一区二区四区蜜桃| 欧美性猛交xxxxxxxx| 成人爽a毛片一区二区免费| 在线这里只有精品| 亚洲欧美综合另类在线卡通| 国产精品一区二区果冻传媒| 精品蜜桃在线看| 日本人妖一区二区| 91精品欧美一区二区三区综合在| 亚洲成人综合在线| 欧美影院一区二区三区| 亚洲永久精品大片| 欧美色电影在线| 偷窥国产亚洲免费视频| 精品视频免费看| 调教+趴+乳夹+国产+精品| 欧美日韩mp4| 午夜激情一区二区三区| 欧美三级日本三级少妇99| 亚洲国产精品尤物yw在线观看| 欧美性videosxxxxx| 一区二区三区精品视频| 欧美在线观看视频一区二区三区| 一区二区三区日韩欧美| 欧美视频中文一区二区三区在线观看| 一区二区三区在线观看国产| 欧美日韩视频在线一区二区| 日日夜夜免费精品视频| 在线播放国产精品二区一二区四区| 午夜电影网一区| 欧美成人三级电影在线| 国内精品国产成人国产三级粉色| 久久久精品蜜桃| av毛片久久久久**hd| 洋洋av久久久久久久一区| 欧美群妇大交群中文字幕| 日本成人在线网站| 久久日韩粉嫩一区二区三区| 成人污视频在线观看| 亚洲制服丝袜av| 精品少妇一区二区三区免费观看| 国产精品99久久久久久似苏梦涵| 国产精品麻豆视频| 欧美亚洲一区二区三区四区| 日韩**一区毛片| 国产日韩欧美精品一区| 欧美影视一区在线| 美国三级日本三级久久99| 国产女主播一区| 欧洲亚洲精品在线| 狠狠色狠狠色综合| 中文字幕一区二区三| 欧美日韩高清影院| 国产一区二区精品久久99| 亚洲人成精品久久久久| 91精品黄色片免费大全| 成人一区二区在线观看| 亚洲va天堂va国产va久| 国产女人18毛片水真多成人如厕 | 韩国在线一区二区| 中文字幕在线不卡一区二区三区 | 亚洲国产精品黑人久久久| 在线视频国产一区| 国产一区二区视频在线播放| 亚洲一区二区视频| 国产亚洲欧美一区在线观看| 在线一区二区三区做爰视频网站| 精品写真视频在线观看| 一区二区在线观看视频| 精品久久国产老人久久综合| 91免费看片在线观看| 激情综合网天天干| 一区二区三区蜜桃网| 久久久久久97三级| 欧美另类变人与禽xxxxx| 白白色亚洲国产精品| 久久超碰97人人做人人爱| 一区二区视频在线| 国产日韩欧美精品在线| 欧美一区二区久久久|