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

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

?? discoveryconfigadv.java

?? jxta平臺的開發包
?? JAVA
字號:
/* * Copyright (c) 2004 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: DiscoveryConfigAdv.java,v 1.4 2006/05/30 20:53:50 hamada Exp $ */package net.jxta.impl.protocol;import java.net.URI;import java.util.ArrayList;import java.util.Enumeration;import java.util.Iterator;import java.util.List;import net.jxta.document.Advertisement;import net.jxta.document.AdvertisementFactory;import net.jxta.document.Attributable;import net.jxta.document.Attribute;import net.jxta.document.Document;import net.jxta.document.Element;import net.jxta.document.ExtendableAdvertisement;import net.jxta.document.MimeMediaType;import net.jxta.document.StructuredDocument;import net.jxta.document.XMLElement;import net.jxta.id.ID;import org.apache.log4j.Level;import org.apache.log4j.Logger;/** * Contains parameters for configuration of the Reference Implemenation * Rendezvous Service. * * <p/><pre><code> * * </code></pre> * */public final class DiscoveryConfigAdv extends ExtendableAdvertisement {    /**     *  Instantiator for DiscoveryConfigAdv     */    public static class Instantiator implements AdvertisementFactory.Instantiator {        /**         * {@inheritDoc}         */        public String getAdvertisementType( ) {            return advType;        }        /**         * {@inheritDoc}         */        public Advertisement newInstance( ) {            return new DiscoveryConfigAdv();        }        /**         * {@inheritDoc}         */        public Advertisement newInstance(Element root) {            return new DiscoveryConfigAdv( root );        }    };    /**     *  Log4J Logger     */    private static final Logger LOG = Logger.getLogger(DiscoveryConfigAdv.class.getName());    /**     *  Our DOCTYPE     */    private static final String advType =  "jxta:DiscoConfigAdv";    private static final String FORWARD_ALWAYS_REPLICA = "forwardAlwaysReplica";    private static final String FORWARD_BELOW_TRESHOLD = "forwardBelowThreshold";    private static final String LOCAL_ONLY = "localOnly";    private static final String [] fields = { };    /**     * If true, the discovery service will always forward queries to the replica peer     * even if there are local responses, unless the replica peer is the local peer.     */    private boolean forwardAlwaysReplica = false;    /**     * If true, the discovery service will always forward queries if the number of local     * responses is below the specified threshold. The threshold may be reduced by the number     * of local responses before forwarding. NOTE: not yet implemented.     */    private boolean forwardBelowTreshold = false;    /**     * localOnly discovery.     */    private boolean localOnly = false;    /**     *  Returns the identifying type of this Advertisement.     *     *  <p/><b>Note:</b> This is a static method. It cannot be used to determine     *  the runtime type of an advertisment. ie.     *  </p><code><pre>     *      Advertisement adv = module.getSomeAdv();     *      String advType = adv.getAdvertisementType();     *  </pre></code>     *     *  <p/><b>This is wrong and does not work the way you might expect.</b>     *  This call is not polymorphic and calls     *  Advertiement.getAdvertisementType() no matter what the real type of the     *  advertisment.     *     * @return String the type of advertisement     */    public static String getAdvertisementType() {        return advType ;    }    /**     *  Use the Instantiator through the factory     */    DiscoveryConfigAdv() {}    /**     *  Use the Instantiator through the factory     */    DiscoveryConfigAdv(Element root) {        if( !XMLElement.class.isInstance( root ) )            throw new IllegalArgumentException( getClass().getName() + " only supports XLMElement" );        XMLElement doc = (XMLElement) root;        String doctype = doc.getName();        String typedoctype = "";        Attribute itsType = doc.getAttribute( "type" );        if( null != itsType )            typedoctype = itsType.getValue();        if( !doctype.equals(getAdvertisementType()) && !getAdvertisementType().equals(typedoctype) ) {            throw new IllegalArgumentException( "Could not construct : "                                                + getClass().getName() + "from doc containing a " + doc.getName() );        }        Enumeration eachAttr = doc.getAttributes();        while (eachAttr.hasMoreElements()) {            Attribute aDiscoAttr = (Attribute) eachAttr.nextElement();            String name = aDiscoAttr.getName();            boolean flag = Boolean.valueOf(aDiscoAttr.getValue().trim()).booleanValue();            if( FORWARD_ALWAYS_REPLICA.equals(name) ) {                forwardAlwaysReplica = flag;            } else if ( FORWARD_BELOW_TRESHOLD.equals(name) ) {                forwardBelowTreshold = flag;            } else if ( LOCAL_ONLY.equals(name) ) {                localOnly = flag;            } else {                if ( LOG.isEnabledFor(Level.WARN) ) {                    LOG.warn( "Unhandled Attribute: " + name );                }            }        }    }    /**     * Make a safe clone of this DiscoveryConfigAdv.     *     * @return Object A copy of this DiscoveryConfigAdv     */    public Object clone() {        DiscoveryConfigAdv result = new DiscoveryConfigAdv();        return result;    }    /**     * {@inheritDoc}     */    public String getAdvType() {        return getAdvertisementType();    }    /**     * {@inheritDoc}     */    public final String getBaseAdvType() {        return getAdvertisementType();    }    /**     *  {@inheritDoc}     */    public ID getID() {        return ID.nullID;    }    /**     *  {@inheritDoc}     */    public Document getDocument( MimeMediaType encodeAs ) {        StructuredDocument adv = (StructuredDocument) super.getDocument( encodeAs );        if( adv instanceof Attributable ) {            Attributable attrDoc = (Attributable) adv;            // Do not output if false. It is the default value.            if (forwardAlwaysReplica) {                attrDoc.addAttribute( FORWARD_ALWAYS_REPLICA, Boolean.toString(forwardAlwaysReplica) );            }            if (forwardBelowTreshold) {                attrDoc.addAttribute( FORWARD_BELOW_TRESHOLD, Boolean.toString(forwardBelowTreshold) );            }            if (localOnly) {                attrDoc.addAttribute( FORWARD_BELOW_TRESHOLD, Boolean.toString(localOnly) );            }        }        return adv;    }    /**     *  {@inheritDoc}     */    public String [] getIndexFields() {        return fields;    }    /**     * True if this discovery service will forward queries to the replica peer in all cases, rather     * than only in the absence of local responses.     *     * @return The current setting.     */    public boolean getForwardAlwaysReplica() {        return forwardAlwaysReplica;    }    /**     * Specifies if this discovery service will forward queries to the replica peer in all cases, rather than only in the absence     * of local responses.     *     * @param newvalue The new setting.     */    public void setForwardAlwaysReplica(boolean newvalue) {        forwardAlwaysReplica = newvalue;    }    /**     * True if this discovery service will forward queries when the number of local responses     * is below the specified treshold, rather than only in the absence of local responses.     *     * @return The current setting.     */    public boolean getForwardBelowTreshold() {        return forwardBelowTreshold;    }    /**     * Specifies if this discovery service will forward queries when the number of local responses is below the specified     * treshold, rather than only in the absence of local responses.     *     * @param newvalue The new setting.     */    public void setForwardBelowTreshold(boolean newvalue) {        forwardBelowTreshold = newvalue;    }    /**     * True if this discovery service performs only local discovery.     *     * @return The current setting.     */    public boolean getLocalOnly() {        return localOnly;    }    /**     * Specifies if this discovery service will perform local only discovery.     *     * @param newvalue The new setting.     */    public void setLocalOnly(boolean newvalue) {        localOnly = newvalue;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91网站在线观看视频| 美女脱光内衣内裤视频久久影院| 国产在线一区观看| 久久看人人爽人人| 成人精品gif动图一区| 国产精品免费免费| 91国产免费观看| 蜜桃视频第一区免费观看| 精品国产乱码久久久久久牛牛 | 久久精品一区四区| 国产成人无遮挡在线视频| 国产精品私人自拍| 欧美体内she精高潮| 蜜桃视频在线一区| 国产精品女主播在线观看| 成人av影院在线| 亚洲成人av在线电影| 欧美v亚洲v综合ⅴ国产v| 丁香五精品蜜臀久久久久99网站| 亚洲人成精品久久久久| 欧美美女网站色| 国产一区在线视频| 亚洲在线观看免费| 日韩免费视频线观看| 成人动漫一区二区三区| 亚洲高清免费在线| 2017欧美狠狠色| 91蜜桃网址入口| 蜜桃精品视频在线观看| 亚洲欧美综合网| 日韩情涩欧美日韩视频| 夫妻av一区二区| 亚洲激情网站免费观看| 久久在线观看免费| 欧美性色黄大片手机版| 成人一道本在线| 青青青爽久久午夜综合久久午夜 | 亚洲特级片在线| 欧美一级高清大全免费观看| 成人一级片网址| 日韩专区欧美专区| 国产精品色婷婷久久58| 国产精品美女久久久久av爽李琼| 依依成人精品视频| aaa亚洲精品| 久久精品亚洲乱码伦伦中文| 国内精品国产三级国产a久久 | 日本视频在线一区| 91丝袜美腿高跟国产极品老师| 一本到三区不卡视频| ...xxx性欧美| 国产丝袜美腿一区二区三区| 色噜噜偷拍精品综合在线| 激情另类小说区图片区视频区| 亚洲一区二区在线观看视频 | 奇米影视在线99精品| 亚洲天天做日日做天天谢日日欢| 精品99一区二区| 在线不卡免费av| 在线欧美小视频| 91网站在线播放| 不卡av电影在线播放| 国产精品 欧美精品| 激情五月婷婷综合| 麻豆传媒一区二区三区| 亚洲成av人片在线观看| 亚洲最新在线观看| 亚洲私人影院在线观看| 成人免费一区二区三区视频| 欧美国产亚洲另类动漫| 国产色一区二区| 久久毛片高清国产| 国产日韩综合av| 亚洲国产精品成人综合 | 亚洲精品乱码久久久久久久久| 国产精品久久久久久久久果冻传媒| 久久精品一区蜜桃臀影院| 久久久精品综合| 久久久亚洲综合| 国产色爱av资源综合区| 国产欧美日韩麻豆91| 亚洲国产岛国毛片在线| 中文文精品字幕一区二区| 国产欧美中文在线| 亚洲私人影院在线观看| 亚洲一二三区不卡| 日本不卡的三区四区五区| 久久99精品网久久| 国产精品1区二区.| 91在线你懂得| 欧洲一区二区三区免费视频| 欧美日韩第一区日日骚| 欧美xingq一区二区| 国产欧美日韩亚州综合| 日韩毛片精品高清免费| 亚洲1区2区3区4区| 看片网站欧美日韩| 岛国精品在线播放| 色综合久久中文字幕| 欧美二区三区91| 精品国一区二区三区| 国产精品久久久久久久久久免费看| 一色屋精品亚洲香蕉网站| 亚洲国产一二三| 麻豆91精品91久久久的内涵| 国产成人精品在线看| 色婷婷国产精品久久包臀| 8v天堂国产在线一区二区| 久久综合成人精品亚洲另类欧美 | 色偷偷成人一区二区三区91| 欧美日韩免费电影| 精品国产一区二区国模嫣然| 国产精品国产三级国产普通话三级 | 欧美日韩精品三区| 久久综合一区二区| 一区二区三区中文字幕在线观看| 欧美aaaaaa午夜精品| 99久久婷婷国产| 欧美一级二级三级乱码| 中文字幕在线观看不卡| 日韩黄色免费电影| 成人a免费在线看| 7777精品久久久大香线蕉| 欧美国产综合一区二区| 亚洲成av人片在线| 不卡一区在线观看| 日韩精品一区二区在线观看| 国产精品久久影院| 精品一区二区在线看| 91久久精品国产91性色tv| 久久久99精品免费观看| 免费成人性网站| 欧美在线短视频| 国产精品欧美久久久久无广告| 麻豆成人久久精品二区三区小说| 91在线观看高清| 国产欧美一区二区三区网站| 男男gaygay亚洲| 欧美视频一二三区| 一区在线观看视频| 国产高清在线精品| 精品理论电影在线| 爽好多水快深点欧美视频| 色综合久久综合网| 国产精品久久久久久久久果冻传媒| 韩国女主播一区| 欧美大白屁股肥臀xxxxxx| 亚洲午夜电影网| 一本色道亚洲精品aⅴ| 国产精品夫妻自拍| 国产精品18久久久久久久网站| 日韩女优毛片在线| 日韩激情一二三区| 欧美三级午夜理伦三级中视频| 中文字幕中文字幕一区| 成人午夜激情在线| 国产亚洲视频系列| 国内精品伊人久久久久av一坑| 日韩精品一区二区三区在线观看 | 久久99国产精品免费| 5月丁香婷婷综合| 亚洲国产aⅴ天堂久久| 在线观看视频91| 亚洲午夜久久久久久久久电影院| zzijzzij亚洲日本少妇熟睡| 国产精品乱码一区二区三区软件 | 欧美老女人第四色| 亚洲妇熟xx妇色黄| 欧美日韩精品一区二区| 亚洲成人精品在线观看| 777奇米成人网| 另类调教123区| 2021国产精品久久精品| 国产传媒一区在线| 国产精品久久三区| 色综合久久久网| 亚洲成人av资源| 日韩午夜在线观看| 国产精品自拍av| 欧美国产精品一区二区| 99视频精品全部免费在线| 亚洲免费在线电影| 欧美视频一二三区| 久久99精品久久久久久国产越南| 久久久精品综合| eeuss国产一区二区三区| 亚洲最大色网站| 91精品中文字幕一区二区三区 | 成人av片在线观看| 亚洲蜜臀av乱码久久精品蜜桃| 欧美艳星brazzers| 久久精品av麻豆的观看方式| 国产无人区一区二区三区| www.av亚洲| 五月婷婷另类国产| 久久久国产精品不卡| 91在线精品一区二区| 奇米综合一区二区三区精品视频| 久久久久成人黄色影片| 欧美专区亚洲专区|