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

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

?? restopeer.java

?? 冒險島游戲的flash版本的函數
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
	// the brand name of RestoPeer. So each RestoPeer instance	// must have a unique name.	myAdv.setName("RestoNet:RestoPipe:" + brand);	myAdv.setType(PipeService.UnicastType);	// Create the module impl advertisement that represents	// the RestoPeer service.	// Peergroup services are also represented by modules since a	// peergroup service needs to be dynamically loaded when the	// corresponding peergroup is instantiated on the peer.	// The constructor of the service 	// module impl takes a set of arguments to describe the service:	//    msrvID : unique spec ID of the restoNet service	//    "RestoPeerService" : is the java class implementing the service	//    "http://jxta.org/tutorial/RestoPeer.jar" : location to find jar file	//    "sun.com" : provider of the service	//    a description of the service        ModuleImplAdvertisement restoImplAdv =                createServiceModuleImplAdv(msrvID,		"RestoPeerService", "http://jxta.org/tutorial/RestoPeer.jar",		"sun.com","RestoPeer Service Module Implementation", myAdv);        // Create a new peergroup that is a clone of the NetPeergroup        // but with the added RestoPeer Service.        return createPeerGroup(netpg, "RestoNet", restoImplAdv);    }    // This is a utility method to create a new peergroup    // implementation. The new peergroup will have all the    // same services as the parent peergroup; it will have an    // additional service (the srvImpl).    //     // The method creates the    // new Peer Group Module Implementation Advertisement and    // publishes it; creates the associated PeerGroup Adv and    // publishes it; and instantiates the peergroup    // using the just created PeerGroup Adv.    //      // parent: parent peergroup the new group is created into    // groupName : name of the new group    // srvImpl :  new peergroup service to add to the default set of    //            NetPeergroup services    private PeerGroup  createPeerGroup(PeerGroup parent, String groupName, 				       ModuleImplAdvertisement srvImpl) {        PeerGroup myPeerGroup = null;        PeerGroupAdvertisement myPeerGroupAdvertisement = null;        ModuleImplAdvertisement myModuleImplAdv = null;                // Create the PeerGroup Module Implementation adding the	// new peergroup service        myModuleImplAdv = createPeerGroupModuleImplAdv(parent, srvImpl);        // Publish the new peergroup module implementation in the        // parent peer group        DiscoveryService parentDiscovery = parent.getDiscoveryService();        // Publish advertisement in the parent peergroup with the default        // lifetime and expiration time for remote publishing        try {            parentDiscovery.publish(myModuleImplAdv, DiscoveryService.ADV, 		PeerGroup.DEFAULT_LIFETIME, PeerGroup.DEFAULT_EXPIRATION);            parentDiscovery.remotePublish(myModuleImplAdv,                DiscoveryService.ADV, PeerGroup.DEFAULT_EXPIRATION);        }        catch (java.io.IOException e) {            System.err.println(                "Cannot publish the new peergroup ModuleImplAdv");            return null;        }    	System.out.println(                "Published new Peergroup ModulImpl advertisement for : "                + groupName);        // Create and publish the new PeerGroup Advertisement        // corresponding to the new peergroup implementation        myPeerGroupAdvertisement= createPeerGroupAdvertisement(				  myModuleImplAdv,groupName);        // Publish the advertisementin the parent peer group with the        // default lifetime and expiration time        try {            parentDiscovery.publish(myPeerGroupAdvertisement,                DiscoveryService.GROUP, PeerGroup.DEFAULT_LIFETIME,                PeerGroup.DEFAULT_EXPIRATION);            parentDiscovery.remotePublish(myPeerGroupAdvertisement,                DiscoveryService.GROUP, PeerGroup.DEFAULT_EXPIRATION);        }        catch (java.io.IOException e) {            System.err.println("Cannot create the new PeerGroupAdvertisement");	    return null;        }	System.out.println("Published the new PeerGroup advertisement for :"	    + groupName);	try {	    // Finally, instantiate the new PeerGroup            myPeerGroup = parent.newGroup(myPeerGroupAdvertisement);	    System.out.println("Instantiated the new PeerGroup " + groupName);        } catch (net.jxta.exception.PeerGroupException e) {            System.err.println("Cannot create the new Peer Group");            return null;        }        return myPeerGroup;    }    // This method is a generic method used to create a new    // module impl advertisement for representing a peergroup    // service. Each module implementation corresponds to a unique    // module spec id that uniquely identifies a peergroup service.    //    // A peergroup service is represented by:    //     id: unique module spec id identifying the new peergroup service    //     code: java class that implement the peergroup service    //     uri: location where we can download the java class implementing the service    //     provider: identity of the provider    //     desc: description of the service.    //     padv: pipe advertisement to invoke the service    private  ModuleImplAdvertisement createServiceModuleImplAdv(               ModuleSpecID id,	       String       code,	       String       uri,	       String       provider,	       String       desc,	       PipeAdvertisement padv) {	// Construct a new module implementation advertisment        ModuleImplAdvertisement ServiceModuleImplAdv =            (ModuleImplAdvertisement)            AdvertisementFactory.newAdvertisement(                ModuleImplAdvertisement.getAdvertisementType());	// Set a unique module Spec ID associated with this	// service implementation        ServiceModuleImplAdv.setModuleSpecID(id);	// Set the java class that implements this service        ServiceModuleImplAdv.setCode(code);		// Set the description of the new service        ServiceModuleImplAdv.setDescription(desc);	// Define the compatibility Java JDK1.4 for loading this module	StructuredTextDocument doc = (StructuredTextDocument)                StructuredDocumentFactory.newStructuredDocument(                    new MimeMediaType("text", "xml"), "Comp");        Element e = doc.createElement("Efmt", "JDK1.4");        doc.appendChild(e);        e = doc.createElement("Bind", "V1.0 Ref Impl");        doc.appendChild(e);        ServiceModuleImplAdv.setCompat(doc);	// Set the URL where we can download the code for this module        ServiceModuleImplAdv.setUri(uri);	// Set the provider for this module        ServiceModuleImplAdv.setProvider(provider);	// Set the pipe advertisement into a param doc to be used 	// by a peer to connect to the service	StructuredTextDocument paramDoc = (StructuredTextDocument)                 StructuredDocumentFactory.newStructuredDocument                 (new MimeMediaType("text/xml"), "Parm");        StructuredDocumentUtils.copyElements(paramDoc, paramDoc,			 (Element) padv.getDocument(new MimeMediaType("text/xml")));        ServiceModuleImplAdv.setParam(paramDoc);	// Return the new module implementation for this service        return ServiceModuleImplAdv;    }    // Create a Module Impl Advertisement that represents a peergroup    // which is a clone of the NetPeerGroup, but adds a new peergroup    // service to the peergroup.    private ModuleImplAdvertisement createPeerGroupModuleImplAdv(                PeerGroup parent, 		ModuleImplAdvertisement serviceModuleImplAdv) {        ModuleImplAdvertisement allPurposePeerGroupImplAdv = null;        StdPeerGroupParamAdv PeerGroupParamAdv = null;        try {	    // Clone the parent (NetPeerGroup) implementation to get	    // a module implementation            allPurposePeerGroupImplAdv =                parent.getAllPurposePeerGroupImplAdvertisement();        }        catch (Exception e) {            System.err.println("Cannot get allPurposePeerGroupImplAdv " + e);	    return null;        }        	// Get the param field that conatins all the peergroup services	// associated with the peergroup        try {            PeerGroupParamAdv = new StdPeerGroupParamAdv(			        allPurposePeerGroupImplAdv.getParam());        }        catch (PeerGroupException e) {            System.err.println("Cannot get StdPeerGroupParamAdv " + e); 	    return null;        }		// Get the hashtable containaing the list of all the peergroup	// services from the param advertisements        Hashtable allPurposePeerGroupServicesHashtable =            PeerGroupParamAdv.getServices();	// Add our new peergroup service to the list of peergroup services	allPurposePeerGroupServicesHashtable.put(mcID, serviceModuleImplAdv);		// Update the PeerGroupModuleImplAdv with our new list	// of peergroup services	allPurposePeerGroupImplAdv.setParam((Element) 	        PeerGroupParamAdv.getDocument(new MimeMediaType("text/xml")));	// Set the new unique Spec ID that identifies this new peergroup	// implementation	allPurposePeerGroupImplAdv.setModuleSpecID(msID);         // We are done creating our new peergroup implementation        return allPurposePeerGroupImplAdv;    }    // This utility method is used to create a PeerGroup advertisement    // associated with a module peergroup implementation    private PeerGroupAdvertisement createPeerGroupAdvertisement(	 ModuleImplAdvertisement implAdv, String groupName) {	// Create a new peergroup advertisement        PeerGroupAdvertisement myadv = (PeerGroupAdvertisement) 	    AdvertisementFactory.newAdvertisement(	        PeerGroupAdvertisement.getAdvertisementType());                // Instead of creating a new group ID we use the        // RestoPeer pre-defined peergroup id, so we create the same        // peergroupId each time the group	// is created        myadv.setPeerGroupID(restoPeerGroupID);	// Assign the pre-defined module spec id that corresponds	// to our peergroup module implementation        myadv.setModuleSpecID(implAdv.getModuleSpecID());		// Assign peergroup name        myadv.setName(groupName);	// Set the peergroup description        myadv.setDescription("This is RestoNet Peergroup");                return myadv;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
偷拍一区二区三区| 在线一区二区三区做爰视频网站| 日产国产欧美视频一区精品| 亚洲一区二区三区四区不卡| 亚洲午夜久久久久久久久久久| 亚洲综合av网| 亚洲成人av一区二区三区| 亚洲午夜影视影院在线观看| 亚洲一区二区三区影院| 亚洲图片欧美一区| 日本亚洲一区二区| 久久se这里有精品| 国产一区二区三区精品视频| 国产成人午夜精品5599| 国产精品自在欧美一区| 成人免费看视频| 91麻豆视频网站| 欧美日韩视频一区二区| 欧美大片顶级少妇| 亚洲国产成人在线| 亚洲猫色日本管| 亚洲va欧美va人人爽午夜| 日韩影视精彩在线| 激情综合亚洲精品| 高清不卡在线观看| 在线观看视频一区二区欧美日韩| 懂色av一区二区三区免费看| 成人午夜免费av| 极品美女销魂一区二区三区免费| 成人av一区二区三区| 福利一区福利二区| 日本高清免费不卡视频| 欧美一区二区三区四区在线观看| 欧美www视频| 一区在线播放视频| 丝袜亚洲精品中文字幕一区| 精品午夜久久福利影院| 91小视频在线| 3atv一区二区三区| 国产欧美日韩综合精品一区二区| 一区二区三区美女| 九九国产精品视频| 一本久久a久久免费精品不卡| 欧美人与禽zozo性伦| 久久久一区二区| 亚洲一区欧美一区| 韩国三级电影一区二区| 色婷婷av一区二区三区软件| 欧美一级一区二区| 亚洲视频在线一区观看| 免费成人你懂的| 99久久免费国产| 日韩片之四级片| 亚洲啪啪综合av一区二区三区| 日韩成人一级大片| 99免费精品在线观看| 精品日韩在线一区| 亚洲国产日韩一级| 国产成人免费网站| 欧美高清视频在线高清观看mv色露露十八 | 日韩精品五月天| 丝袜a∨在线一区二区三区不卡| 免费一级片91| 色婷婷久久久综合中文字幕| 亚洲私人黄色宅男| 久久99精品久久久久| 欧美在线一二三四区| 国产日韩三级在线| 九一九一国产精品| 欧美日韩高清影院| 亚洲少妇最新在线视频| 国产乱对白刺激视频不卡| 欧美日韩一级片网站| 中文字幕中文字幕一区| 韩国v欧美v亚洲v日本v| 欧美一区二区成人6969| 亚洲午夜免费福利视频| 91香蕉视频在线| 国产欧美日韩麻豆91| 久久激五月天综合精品| 欧美久久免费观看| 一区二区三区精品在线| 99久久精品国产导航| 久久在线观看免费| 九一九一国产精品| 欧美成人三级电影在线| 精品国产乱码久久久久久1区2区| 精品一区二区三区香蕉蜜桃| 国产福利一区在线观看| 2020国产精品自拍| 国内精品第一页| 欧美草草影院在线视频| 久久机这里只有精品| 日韩一区二区三区免费看| 爽好久久久欧美精品| 欧美亚洲免费在线一区| 亚洲一区在线视频观看| 欧美影院一区二区| 伊人一区二区三区| 欧美性色综合网| 亚洲成人av中文| 777午夜精品视频在线播放| 亚洲午夜精品久久久久久久久| 在线欧美日韩国产| 一区二区久久久久| 精品视频一区 二区 三区| 性做久久久久久| 欧美日韩另类一区| 日本亚洲视频在线| 日韩欧美高清在线| 国内精品写真在线观看| 精品国产sm最大网站| 国产露脸91国语对白| 欧美激情在线一区二区| 99视频在线观看一区三区| 亚洲男人的天堂一区二区| 欧美偷拍一区二区| 美女国产一区二区| 久久先锋影音av| 国产91高潮流白浆在线麻豆 | 欧洲一区二区三区在线| 亚洲一区二区av在线| 欧美日韩高清一区二区三区| 日本不卡123| 久久精品亚洲精品国产欧美kt∨| 懂色av中文一区二区三区 | 99久久精品99国产精品| 亚洲伊人伊色伊影伊综合网| 91精品国产综合久久精品 | 91精品国产欧美日韩| 久久激情五月激情| 国产精品久久久久久久蜜臀| 91福利视频网站| 久久99国产精品麻豆| 亚洲国产精品t66y| 欧美性受极品xxxx喷水| 男男gaygay亚洲| 国产精品国产自产拍高清av| 欧美午夜影院一区| 激情综合网最新| ●精品国产综合乱码久久久久| 欧美日韩国产高清一区二区三区 | 国产麻豆91精品| 国产精品国产精品国产专区不蜜 | 国产婷婷色一区二区三区四区 | 日韩欧美激情四射| 成人av网站在线观看免费| 亚洲国产精品一区二区久久恐怖片 | 亚洲精品免费在线观看| 国产精品黄色在线观看| 日韩精品资源二区在线| 日韩激情中文字幕| 日本一区二区在线不卡| 欧美午夜寂寞影院| 成人美女视频在线观看18| 亚洲成人av电影在线| 日本一区二区三区四区| 91麻豆精品国产91久久久久久久久 | 午夜精品aaa| 中文字幕av一区二区三区免费看| 欧美精品九九99久久| 99久久精品久久久久久清纯| 日本欧美在线看| 亚洲欧美国产毛片在线| 久久综合精品国产一区二区三区| 91高清在线观看| 国产高清久久久久| 日本不卡一二三区黄网| 亚洲免费av高清| 中文字幕精品一区二区精品绿巨人 | 国产乱子轮精品视频| 香蕉加勒比综合久久| 国产精品久线在线观看| 91精品午夜视频| 国模无码大尺度一区二区三区 | 亚洲色图.com| 欧美mv和日韩mv国产网站| 色婷婷激情一区二区三区| 国产精品一品二品| 免费在线观看成人| 亚洲成av人影院| 亚洲激情在线激情| 国产精品久久久久aaaa樱花| 久久久.com| 精品久久久久久亚洲综合网| 欧美日本不卡视频| 在线国产电影不卡| 色综合久久久久网| jlzzjlzz国产精品久久| 国产a区久久久| 国产精品99久久久久久有的能看| 另类小说视频一区二区| 日韩国产欧美在线观看| 三级欧美韩日大片在线看| 一区二区在线观看av| 亚洲欧美日韩在线不卡| 最近日韩中文字幕| 亚洲色图视频网| 亚洲日本丝袜连裤袜办公室| 亚洲人成亚洲人成在线观看图片 |