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

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

?? discoveryservice.java

?? jxta平臺的開發包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* *  Copyright (c) 2001-2006 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: DiscoveryService.java,v 1.40 2006/06/19 18:27:34 bondolo Exp $ */package net.jxta.discovery;import java.io.IOException;import java.util.Enumeration;import net.jxta.document.Advertisement;import net.jxta.id.ID;import net.jxta.service.Service;/** * Provides an asynchronous mechanism for discovering Advertisement (Peers, * Groups, Pipes, Modules, etc.). The scope of discovery queries can be  * controlled by specifying a name and attribute pair, and/or a threshold.  * The threshold is an upper limit the requesting peer specifies for  * responding peers not to exceed. Each JXTA Peer Group has an instance of  * a DiscoveryService. The scope of discovery is limited to the group. For  * example : * * <p/>A peer in the soccer group invokes the soccer group's DiscoveryService * to discover pipe advertisements for the Score tracker service in the group, * and is interested in a maximum of 10 Advertisements from each peer: * <pre> *  discovery.getRemoteAdvertisements(null, discovery.ADV, *                                    "Name", "Score tracker*", 10, null); * * </pre> * * <p/>In the above example, peers that are part of the soccer group would * respond. After a getRemoteAdvertisements call is made and the peers respond, * a call to getLocalAdvertisements can be made to retrieve results that have * been found and added to the local group cache. Alternately, a call to * addDiscoveryListener() will provide asynchronous notification of discovered * advertisements. * * <p/>When an Advertisement is published, it is stored, and indexed in the  * peer's local cache. The Advertisement indexes are also shared with  * Rendezvous peers. Advertisement indexes may not be shared with other * peers immediately, but may be updated as part of a periodic process. The * Discovery Service currently updates remote indexes every 30 seconds. * * <p/>It is important to note that what is shared with the rendezvous peer is   * the index and expiration of the advertisement, not the advertisement. The * indexes are republished whenever the peer establishes a new connection with  * a different rendezvous peer. * * <p/>Distributed index garbage collection. A rendezvous peer will GC indexes for * a specific peer when it receive a disconnect message, or it has determined * that a peer is no longer reachable, the latter action is a lazy GC and is * triggered by messenger creation failures which results in a mark and sweep at * a future point in time. * * <p/>DiscoveryService also provides a mechanism for publishing advertisements, * so that they may be discovered. The rules to follow when publishing are: * *  <ul> *    <li> *    Use the current discovery service to publish advertisements private to the *    group. * <pre>discovery.publish(adv); * </pre></li> * *    <li>Use the parent's discovery to publish advertisements that public outside *    of the group. Example : a peer would like publish the "soccer" group in the *    NetPeerGroup * <pre> *        parent=soccerGroup.getParent(); *        discovery= parent.getDiscoveryService() *        discovery.publish(adv); * </pre></li> *  </ul> * * <p/>The threshold can be utilized in peer discovery in situations where a peer * is only interested in other peers, and not about additional peers they may * know about. To achieve this effect for peer discovery set the Threshold to * <code>0</code> (zero). * * <p/>Advertisements are often stored in a persistent local cache. This cache  * can improve performance and responsiveness by retaining advertisements  * between restarts. * *@see        net.jxta.service.Service *@see        net.jxta.resolver.ResolverService *@see        net.jxta.protocol.DiscoveryQueryMsg *@see        net.jxta.protocol.DiscoveryResponseMsg *@see        net.jxta.protocol.ResolverQueryMsg *@see        net.jxta.protocol.ResolverResponseMsg */public interface DiscoveryService extends Service {        /**     * Discovery type Peer     */    public final static int PEER = 0;        /**     * Discovery type Group     */    public final static int GROUP = 1;        /**     *  Discovery type Advertisement     */    public final static int ADV = 2;        /**     * Default lifetime time for advertisements. This is the maximum     * amount of time which the advertisement will remain valid. If the     * advertisement remains valid after this time, then the creator will     * need to republish the advertisement.     */    public final static long DEFAULT_LIFETIME = 1000L * 60L * 60L * 24L * 365L;        /**     *  Default expiration time for advertisements. This is the amount of     *  time which advertisements will live in caches. After this time, the     *  advertisement should be refreshed from the source.     */    public final static long DEFAULT_EXPIRATION = 1000L * 60L * 60L * 2L;        /**     *  Infinite lifetime for advertisements. The advertisement is valid     *  forever. (well maybe it will expire when the sun burns out, but not     *  before then).     */    public final static long INFINITE_LIFETIME = Long.MAX_VALUE;        /**     *  Specifies that the advertisement will have no expiration and will be     *  kept indefinitely.     */    public final static long NO_EXPIRATION = Long.MAX_VALUE;        /**     *  Discover advertisements from remote peers. This does not normally      *  provide an exhaustive search. Instead it provides a "best efforts"      *  search which will provide a selection of advertisements of matching the      *  search criteria. The selection of advertisements returned may be random      *  or predictable depending upon the network configuration and no      *  particular behaviour should be assumed. In general the narrower the     *  query specified the more exhaustive the responses will be.      *      *  <p/>Discovery can be performed in two ways : <ul>     *      <li>With a <tt>null</tt> peerid - The discovery query is     *      propagated on via the Rendezvous Service and via local sub-net     *      utilizing IP multicast.</li>     *      <li>With a provided peerid - The discovery query is forwarded to the     *      specified peer.</li>     *  </ul>     *     *  <p/>The scope of advertisements returned can be narrowed by specifying     *  an {@code attribute} and {@code value} pair. The {@code attribute} is     *  a case-sensitive string matching the name of an Advertisement XML tag     *  who's values will be matched by the {@code value}.  Only a limited number     *  of Advertisement XML fields are indexed. {@link     *  net.jxta.document.Advertisement#getIndexFields()} will return the      *  fields on which you may query for a particular Advertisement type.      *      *  <p/>The {@code value} is a case-insensitive string who's value is     *  matched against the values of {@code attribute} fields of Advertisements.     *  The {@code} value may be of several forms :     *  <ul>     *      <li>{@code null} - Don't care. All advertisements with the matching     *      {@code attribute} will be returned.</li>     *      <li>exact value - Only advertisements with an {@code attribute}     *      field who's value exactly matches the string {@code value} will be     *      returned.</li>     *      <li>wild card - Only advertisements with an {@code attribute}     *      field who's value matches the wild card expression {@code value}      *      will be returned. eg. The following expressions all match against     *      "FooBar":     *      <ul>     *          <li>{@code foO*}</li>     *          <li>{@code *Bar}</li>     *          <li>{@code *oBA*}</li>     *      </ul></li>     *  </ul>     *      * @param peerid If provided the query will be forwarded to the specified     *      peer. If {@code null} then the query will be propagated through the     *      network to peers with matching Advertisements.     * @param type Discovery type; <tt>PEER</tt>, <tt>GROUP</tt> or <tt>ADV</tt>.     * @param  attribute indexed element name (see advertisement(s) for a     *       list of indexed fields. A null attribute indicates any advertisement     *       of specified type     * @param  value      value of attribute to narrow discovery to. Valid values for     *      this parameter are null (don't care), Exact value, or use of wild     *      card(s) (e.g. if a Advertisement defines <Name>FooBar</name> , a value     *      of "*bar", "foo*", or "*ooB*", will return the Advertisement     * @param  threshold  The maximum number of matching advertisements which     *      be returned by each responding peer. A {@code threshold} of 0, and      *      {@code type} of {@code PEER} has a special behaviour.     * @return query ID for this discovery query.     */    public int getRemoteAdvertisements(String peerid,            int type,            String attribute,            String value,            int threshold);        /**     *  Discover advertisements from remote peers. This does not normally      *  provide an exhaustive search. Instead it provides a "best efforts"      *  search which will provide a selection of advertisements of matching the 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
大尺度一区二区| 国产传媒欧美日韩成人| 亚洲1区2区3区4区| 高清不卡在线观看| 欧洲中文字幕精品| 久久亚洲影视婷婷| 亚洲成人第一页| 国产精品一二三四| 日韩一区二区三区视频| 尤物在线观看一区| 国产精品自产自拍| 日韩一区二区三| 亚洲一区二区在线观看视频| 成人高清免费在线播放| 欧美一区二区三区视频免费播放| 欧美极品美女视频| 久久精品国产亚洲一区二区三区| 色噜噜夜夜夜综合网| 国产精品美女一区二区在线观看| 蜜臀av性久久久久蜜臀aⅴ四虎| 色综合久久中文综合久久牛| 欧美极品美女视频| 国产高清在线精品| 欧美一区二区三区爱爱| 午夜精品福利视频网站| 日本乱人伦一区| 综合激情网...| 成人高清免费观看| 国产精品另类一区| 国产精品69毛片高清亚洲| 欧美va亚洲va国产综合| 日韩和的一区二区| 欧美精品日韩精品| 日本不卡免费在线视频| 7777精品伊人久久久大香线蕉最新版| 亚洲高清免费视频| 欧美日韩一区二区三区不卡| 亚洲一区日韩精品中文字幕| 欧美这里有精品| 亚洲一区免费观看| 欧美日韩国产一二三| 视频在线观看91| 欧美一区二区三区电影| 蜜臀av一区二区三区| 精品久久久久久亚洲综合网 | 欧美亚洲国产怡红院影院| 中文字幕一区二区三区不卡在线 | 久久精品国产一区二区三区免费看| 337p亚洲精品色噜噜| 秋霞午夜av一区二区三区| 欧美一级生活片| 国产乱码一区二区三区| 亚洲国产精品t66y| 色综合久久中文字幕综合网| 亚洲v中文字幕| 日韩亚洲欧美一区二区三区| 国产一区二区在线观看视频| 国产欧美综合在线观看第十页| 成人app在线观看| 一区二区三区中文字幕电影 | 精品免费国产二区三区| 国产一区二区导航在线播放| 国产精品久久三区| 欧美视频三区在线播放| 免费观看成人av| 国产欧美日韩亚州综合| 欧美日韩电影在线播放| 国产在线精品一区二区夜色| 中文字幕不卡一区| 欧美视频你懂的| 国产福利视频一区二区三区| 国产精品国产三级国产三级人妇 | 成人高清在线视频| 婷婷一区二区三区| 国产欧美精品区一区二区三区| 一本一道波多野结衣一区二区| 视频一区二区国产| 亚洲国产精品黑人久久久| 欧美色爱综合网| 懂色av一区二区在线播放| 亚洲高清免费视频| 国产精品国产三级国产aⅴ无密码| 欧美精品tushy高清| 成人丝袜18视频在线观看| 亚瑟在线精品视频| 国产精品久久久久久久久快鸭| 91精品国产综合久久蜜臀| 色综合欧美在线视频区| 国产在线精品一区在线观看麻豆| 亚洲一区二区中文在线| 国产精品成人网| 欧美r级在线观看| 欧美怡红院视频| 成人综合在线观看| 久久国产精品一区二区| 亚洲国产cao| 亚洲图片激情小说| 国产欧美精品在线观看| 亚洲精品一区二区三区精华液| 欧美日韩精品一区二区三区 | 另类小说一区二区三区| 美国一区二区三区在线播放| ...av二区三区久久精品| 亚洲精品一区二区精华| 91精品免费在线观看| 色哟哟精品一区| 成人免费av在线| 国产一区二区女| 韩国欧美国产1区| 久久丁香综合五月国产三级网站| 无码av免费一区二区三区试看| 一区二区三区中文字幕| 亚洲精品视频在线观看免费| 中文字幕一区二区视频| 国产精品毛片久久久久久久| 欧美国产一区二区| 国产精品久久久99| 国产精品久久久久久久久果冻传媒| 欧美大片在线观看| 欧美精品一区二区三区蜜桃| 欧美成人官网二区| 日韩欧美国产wwwww| 日韩午夜av一区| 欧美哺乳videos| 久久综合久久99| 欧美国产日本视频| 一区免费观看视频| 亚洲一区中文日韩| 午夜亚洲福利老司机| 奇米影视在线99精品| 麻豆精品一区二区av白丝在线| 奇米色777欧美一区二区| 久久成人免费电影| 国产激情91久久精品导航 | 日精品一区二区| 麻豆精品国产91久久久久久| 国产精品99久久久久久有的能看 | 高清不卡一区二区| 91丨九色丨黑人外教| 欧美在线色视频| 欧美日韩美少妇| 亚洲精品一区二区三区福利| 国产精品毛片高清在线完整版 | 蜜臀精品一区二区三区在线观看| 久久99精品久久只有精品| 久久se精品一区精品二区| 成人高清视频免费观看| 欧美在线观看一区二区| 欧美成人一区二区| 中文字幕在线不卡一区二区三区 | 视频一区二区不卡| 国产美女精品人人做人人爽| 91免费国产视频网站| 欧美男人的天堂一二区| 26uuu国产电影一区二区| 亚洲三级免费观看| 免费在线视频一区| 91毛片在线观看| 精品国产亚洲在线| 亚洲视频香蕉人妖| 久久99精品视频| 色域天天综合网| 久久毛片高清国产| 亚洲午夜三级在线| 国产激情一区二区三区| 精品视频资源站| 国产亚洲综合色| 日本不卡高清视频| 91成人免费网站| 欧美精品一区二| 性做久久久久久免费观看欧美| 国产福利一区二区| 91精品国产一区二区三区香蕉 | 日本一区二区久久| 亚洲成人激情自拍| 成人激情开心网| 日韩欧美综合在线| 午夜久久久影院| 色综合久久天天综合网| 国产亚洲一区二区三区在线观看| 亚洲欧美日韩电影| 国产成人综合精品三级| 91精品国产综合久久久蜜臀图片| 国产精品久久久久久久久搜平片| 久久精品久久精品| 欧美日韩一区小说| 一区二区不卡在线播放 | 国产69精品久久777的优势| 制服视频三区第一页精品| 一区二区三区电影在线播| 国产成人av电影在线播放| 日韩美女在线视频| 日本不卡一区二区三区| 欧美日韩成人综合在线一区二区| 一区二区三区四区在线免费观看| av电影在线观看完整版一区二区| 国产人妖乱国产精品人妖| 国产一区二区三区久久悠悠色av| 日韩欧美一区二区免费| 久久福利资源站|