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

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

?? configurator.java

?? jxta平臺的開發包
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* *  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 materialsset 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 THE APACHE SOFTWARE FOUNDATION 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: Configurator.java,v 1.213 2006/06/19 18:27:36 bondolo Exp $ */package net.jxta.ext.config;import net.jxta.ext.config.optimizers.RelayOptimizer;import java.io.File;import java.io.FileNotFoundException;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.FileReader;import java.io.InputStreamReader;import java.io.Reader;import java.io.IOException;import java.io.ObjectInput;import java.io.ObjectOutput;import java.io.StringWriter;import java.lang.reflect.UndeclaredThrowableException;import java.net.MalformedURLException;import java.net.URI;import java.net.URISyntaxException;import java.net.URL;import java.security.cert.Certificate;import java.security.cert.X509Certificate;import java.text.MessageFormat;import java.util.Arrays;import java.util.ArrayList;import java.util.Collections;import java.util.Enumeration;import java.util.HashMap;import java.util.Iterator;import java.util.List;import java.util.Map;import java.util.Map.Entry;import java.util.NoSuchElementException;import java.util.Properties;import net.jxta.document.AdvertisementFactory;import net.jxta.document.Attributable;import net.jxta.document.Attribute;import net.jxta.document.Element;import net.jxta.document.MimeMediaType;import net.jxta.document.StructuredDocument;import net.jxta.document.StructuredDocumentFactory;import net.jxta.document.StructuredDocumentUtils;import net.jxta.document.StructuredTextDocument;import net.jxta.document.TextElement;import net.jxta.document.XMLDocument;import net.jxta.exception.ConfiguratorException;import net.jxta.id.ID;import net.jxta.id.IDFactory;import net.jxta.impl.endpoint.IPUtils;import net.jxta.impl.membership.pse.PSEUtils;import net.jxta.impl.peergroup.PlatformConfigurator;import net.jxta.impl.protocol.HTTPAdv;import net.jxta.impl.protocol.PlatformConfig;import net.jxta.impl.protocol.PSEConfigAdv;import net.jxta.impl.protocol.RdvConfigAdv;import net.jxta.impl.protocol.RelayConfigAdv;import net.jxta.impl.protocol.TCPAdv;import net.jxta.protocol.ConfigParams;import net.jxta.peer.PeerID;import net.jxta.peergroup.PeerGroupFactory;import net.jxta.peergroup.PeerGroupID;import net.jxta.protocol.TransportAdvertisement;import org.apache.log4j.Level;import org.apache.log4j.Logger;/** * A Configurator that is capable of instantiating and persisting JXTA configuration * state based upon declarative {@link net.jxta.ext.config.Profile} and {@link net.jxta.impl.protocol.PlatformConfig} * information. *  * <p>A Configurator serves primarily as a JXTA Configuration Bean, or property * sheet, and implements very little attribute association logic beyond that of * what is required to perform fundamental configuration integrity validation. * * <p>The principal constituents of a JXTA Configurator are: * * <ul> *   <li>Peer Information</li> *   <li>Peer Transports</li> *   <li>Peer Services</li> *   <li>JXTA Network</li> *   <li>Configuration Extensions</li> * </ul> * * <p>Peer Information describes the local JXTA instance that a specified * Configurator instance represents. The bulk of the Peer Information * configuration data is optional and includes: * * <ul> *   <li>name</li> *   <li>ID</li> *   <li>descriptor</li> *   <li>JXTA Home</li> *   <li>Log4J trace level</li> *   <li>security</li> *   <li>root certificate</li> *   <li>HTTP Proxy</li> * </ul> * * <p>Peer Transports describe the physical {@link net.jxta.ext.config.Address} with which a Peer * connects with the overall JXTA Network. Transports can be specified as * incoming (aka server), outgoing (aka client) and both. Transport * implementations include: * * <ul> *   <li>TCP</li> *   <li>HTTP</li> * </ul> * * <p>Peer Services represent the JXTA Services that a specified Configurator * instance will provision, which include: * * <ul> *   <li>{@link net.jxta.rendezvous.RendezVousService RendezVous}</li> *   <li>Relay</li> *   <li>{@link net.jxta.impl.proxy.ProxyService Proxy}</li> * </ul> * * <p>The JXTA Network information specifies JXTA Network Services upon which a * specified Configurator instance will rely upon, including: * * <ul> *   <li>{@link net.jxta.rendezvous.RendezVousService RendezVous}</li> *   <li>Relays</li> * </ul> * * <p>The Configuration Extensions information includes extensible configuration * features that includes end user provided {@link net.jxta.ext.config.Optimizer}. * * <p>Configuration information can be derived from declarative {@link net.jxta.ext.config.Profile}, * {@link net.jxta.impl.protocol.PlatformConfig}, or programatically via provided APIs. * Further, a combination of all of the above is also possible and often the most * practical. * * <p>The Configurator API which is predominately comprised of a series of property * sheet getter/setter calls in addition to PlatformConfig creation and persistence. *  * <p>A Configurator can be optionally be instantiated by from a {@link net.jxta.ext.config.Profile}, * which is, by and large, a toolable and person-parsible serialized construct in * the form of XML. A {@link net.jxta.ext.config.Profile} basically drives a series of Configurator * API invocations. * * <p>A {@link net.jxta.ext.config.ui.Configurator Configurator UI} is also available, * that provides a series of reusable Configuration UI components that, in turn, * leverage the afore mentioned Profile constructs. * * <p>Prior to {@link net.jxta.impl.protocol.PlatformConfig} generation, the current * Configurator state is exercised via normalization, optimization and validation * processes, the later of which can throw a {@link net.jxta.exception.ConfiguratorException}. * The normalization process massages the configuration state by filling in missing * or incomplete information necessary for further processing. The optimization * process performs a series of pluggable optimizer exercises, as implemented * via the {@link net.jxta.ext.config.Optimizer} interface, that tune and adjust the normalized * configuration state based on the provided optimization heuristics. Lastly, the * validation process performs integrity checks against the current configuration * state just prior to {@link net.jxta.impl.protocol.PlatformConfig} generation. * * <p>The derived {@link net.jxta.impl.protocol.PlatformConfig} instance is then * returned to the Configurator invoker. The {@link net.jxta.ext.config.Configurator#save()} methods will perist * the {@link net.jxta.impl.protocol.PlatformConfig} to the file system. * * @author  james todd [gonzo at jxta dot org] */public class Configuratorimplements PlatformConfigurator {        private final static String COLON = ":";    private final static String SLASH = "/";//    private final static String BRACKET_OPEN = "[";//    private final static String BRACKET_CLOSE = "]";    private final static String PARENTHESIS_OPEN = "(";    private final static String PARENTHESIS_CLOSE = ")";    private final static String EMPTY_STRING = "";    private final static String NEW_LINE = "\n";    private final static String SPACE = " ";    private final static String EMPTY_SPACE = "";    private final static String SPACE_REGEX = "\\s";    private final static String TAB = SPACE + SPACE;    private final static int MILLISECONDS_PER_SECOND = 1000;    private final static char NULL_CHAR = '\0';    private static final String JXTA_URI_PREFIX = ID.URIEncodingName + COLON +        ID.URNNamespace + COLON;    private final static Logger LOG = Logger.getLogger(Configurator.class.getName());        private URI home = Env.JXTA_HOME.toURI();    private String descriptor = Default.PEER_DESCRIPTOR;    private String peerName = null;    private String peerDescription = null;    private Trace trace = Trace.DEFAULT;    private PeerID peerId = null;    private boolean isSecurity = Default.SECURITY_IS_ENABLED;    private String principal = null;    private String password = null;    private URI rootCertificateAddress = null;    private PSEConfigAdv pse = null;    private URI peerProxy = null;    private PeerGroupID infrastructureGroupId = null;    private String infrastructureGroupName = null;    private String infrastructureGroupDescription = null;    private URI rendezVousBootstrap = Default.RENDEZVOUS_BOOTSTRAP_ADDRESS;    private URI relaysBootstrap = Default.RELAYS_BOOTSTRAP_ADDRESS;    private boolean isRelaysDiscovery = Default.RELAYS_DISCOVERY_IS_ENABLED;    private List transports = null;    private RelayConfigAdv relayConfig = null;    private int endpointQueueSize = -1;    private boolean isProxyEnabled = Default.PROXY_SERVICE_IS_ENABLED;    private RdvConfigAdv rdvConfig = null;    private List optimizers = null;    private List validators = null;    private PlatformConfig platformConfig = null;        private final Map customParams = new HashMap();        /**     * @deprecated      will be removed when {@link net.jxta.peergroup.PeerGroupFactory}     *                  defaults to the {@link net.jxta.impl.peergroup.NullConfigurator}     */        public static void setConfigurator(Class configurator) {        if (configurator != null &&            PlatformConfigurator.class.isAssignableFrom(configurator)) {            try {                PeerGroupFactory.setConfiguratorClass(configurator);            } catch (Exception e) {                throw new IllegalArgumentException("invalid configurator", e);            }        } else {            throw new IllegalArgumentException("invalid configurator: " +                (configurator != null ? configurator.getName() : null));        }    }    /**     * Convenience method which constructs a {@link java.net.URI} that represents     * the local ANY/ALL interface(s).     *     * @param   base    provided address     * @return          ANY/ALL interface     */        public static URI toAllAddresses(URI base) {        URI u = null;        URI b = base;        String a = Env.ALL_ADDRESSES.getHostAddress();                if (b != null) {            try {                u = new URI(b.getScheme(), EMPTY_STRING, a, b.getPort(),                    b.getPath(), b.getPath(), b.getFragment());            } catch (URISyntaxException use) {                if (LOG.isEnabledFor(Level.ERROR)) {                    LOG.error("invalid transformation", use);                }            }        } else {            try {                u = new URI(Default.ANY_TCP_ADDRESS.getScheme(), EMPTY_STRING,                    a, Default.TCP_PORT, EMPTY_STRING, EMPTY_STRING,                    EMPTY_STRING);            } catch (URISyntaxException use) {                if (LOG.isEnabledFor(Level.ERROR)) {                    LOG.error("invalid transformation", use);                }            }        }                return u;    }        // xxx: we will likely continue to need a no-arg constructor    /**     * Default constructor.     *     * <p>The default JXTA persistence directory will be set to the value of:     *      * <pre>     *   System.getProperty("user.home", "/.jxta");     * </pre>     *     * <p>Existing {@link net.jxta.ext.config.Profile} and {@link net.jxta.impl.protocol.PlatformConfig}     * files will be parsed in succession in order to contextually instantiate     * the newly create Configurator, enabling configuration update processing.     * In the event a "profile.xml" file does not exist in the JXTA persistence     * directory, the default {@link net.jxta.ext.config.Profile#DEFAULT} profile will be used to     * establish a baseline configuration.     *     * @deprecated It's recommended to use the four params constructor     */        public Configurator() {        this(Env.JXTA_HOME.toURI());    }       /**     * Constructor whereby one can specify a non-default JXTA persistence directory     * value as a {@link java.net.URI}, typically of scheme "file" with which to     * establish the initial context.     *     * @param   home    JXTA persistence directory destination.     */        public Configurator(URI home) {        this(home, null, null, null, null);    }        // xxx: ?deprecation candidate?    /**     * Constructor whereby one can specify a peer name and password.     *     * @param   name        peer name     * @param   password    peer password     */        public Configurator(String name, String password) {        this(Env.JXTA_HOME.toURI(), name, password);    }        // xxx: ?deprecation candidate?    /**     * Constructor whereby one can specify an alternative JXTA persistence directory     * along with the peer name and password with which to establish the inital     * context.     *     * @param   home        JXTA persistence directory destination     * @param   name        peer name     * @param   password    peer password     */        public Configurator(URI home, String name, String password) {        this(home, name, null, name, password);    }       /**     * Constructor whereby one can specify a peer name, principal and password     * with which to establish the initial context.     *     * @deprecated Constructors specifying 'principal' are deprecated.     *     * @param   name        peer name     * @param   principal   peer principal     * @param   password    peer password     */        public Configurator(String name, String principal, String password) {        this(Env.JXTA_HOME.toURI(), name, principal, password);    }        /**     * Constructor whereby one can specify a peer name, description, principal     * and password with which to establish the initial context.     *

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美videossexotv100| 精品免费日韩av| 欧美成人激情免费网| 成人精品国产免费网站| 欧美日本韩国一区| 17c精品麻豆一区二区免费| 蜜臀a∨国产成人精品| 欧美喷潮久久久xxxxx| 久久综合成人精品亚洲另类欧美 | 岛国av在线一区| 亚洲天堂网中文字| 美女视频第一区二区三区免费观看网站| 欧美日韩激情一区二区| 中文字幕欧美激情一区| 免费在线欧美视频| 欧美日韩三级一区二区| 777午夜精品免费视频| 亚洲免费视频中文字幕| 成人综合激情网| 欧美国产欧美综合| 国产精品另类一区| 高清不卡在线观看| 91免费版在线| 综合久久久久久久| jlzzjlzz亚洲日本少妇| 国产精品理论片在线观看| 成人的网站免费观看| eeuss影院一区二区三区| 国产成人精品一区二区三区四区 | 欧美国产日韩a欧美在线观看| 欧美成人vr18sexvr| 亚洲成人激情社区| 欧美三片在线视频观看 | 中文一区二区在线观看| 一区二区三区四区乱视频| 91麻豆国产在线观看| 欧美一区二区三区四区久久 | 日韩一级黄色片| 欧美96一区二区免费视频| 91麻豆精品国产自产在线| 日韩一区精品字幕| 欧美成人猛片aaaaaaa| 国产精品一区在线观看乱码| 2020国产精品久久精品美国| 欧美色涩在线第一页| 国产成人综合亚洲91猫咪| 玉米视频成人免费看| 91福利小视频| 亚洲一区在线观看免费观看电影高清| 激情国产一区二区| 久久久久久久久久久黄色| 国产成人精品综合在线观看 | 美国三级日本三级久久99| 99久久精品免费看国产免费软件| 欧美一区午夜精品| 亚洲精品视频一区二区| 欧美日韩一二三区| 国产精品主播直播| 亚洲一区二区高清| 久久伊人中文字幕| 91国产成人在线| 久久超碰97人人做人人爱| 欧美视频在线不卡| 极品少妇xxxx偷拍精品少妇| 久久久久久久久久久久电影| 一区二区三区免费观看| 91精品国产综合久久福利软件| 一区在线播放视频| 91精品国产色综合久久ai换脸| 亚洲最色的网站| 99久久综合狠狠综合久久| 同产精品九九九| 国产精品福利在线播放| 91精品久久久久久久99蜜桃| 国产成人免费视频一区| 丝袜诱惑制服诱惑色一区在线观看| 91日韩一区二区三区| 久久99精品久久久久久国产越南| 欧美日韩亚洲综合一区二区三区| 亚洲无线码一区二区三区| 国产亚洲欧美中文| 制服丝袜亚洲精品中文字幕| 国产激情偷乱视频一区二区三区| 久久午夜色播影院免费高清| 欧美日韩二区三区| 久久国内精品视频| 欧美在线一二三四区| 91精品国产一区二区三区| 大尺度一区二区| 一级日本不卡的影视| 成人永久免费视频| 久久www免费人成看片高清| 亚洲人吸女人奶水| 91一区二区在线| 国产成人免费视频精品含羞草妖精| 久久久精品欧美丰满| 欧美精品日韩综合在线| 91丨九色丨蝌蚪丨老版| 成人午夜精品在线| 亚洲精品网站在线观看| 国产精品免费免费| 久久精品夜色噜噜亚洲a∨| 99久久精品情趣| 国产成人av资源| 国产在线观看免费一区| 久久激五月天综合精品| 日本aⅴ精品一区二区三区| 亚洲高清免费观看高清完整版在线观看 | 日本欧洲一区二区| 亚洲一区二区三区美女| 一区二区三区毛片| 亚洲一区视频在线| 亚洲香蕉伊在人在线观| 亚洲线精品一区二区三区八戒| 日韩精品一区二区三区在线| 欧美高清视频在线高清观看mv色露露十八| 美国av一区二区| 久久超碰97人人做人人爱| 韩国精品主播一区二区在线观看 | 亚洲成av人在线观看| 亚洲精品v日韩精品| 亚洲精品中文字幕在线观看| 日韩西西人体444www| 精品国精品国产尤物美女| 精品成人免费观看| 国产高清亚洲一区| av在线不卡免费看| 欧美在线播放高清精品| 日本精品视频一区二区三区| 91麻豆产精品久久久久久| 欧美午夜不卡视频| 日韩欧美不卡一区| 国产日本欧洲亚洲| 亚洲精品乱码久久久久久日本蜜臀| 欧美丰满少妇xxxxx高潮对白| www..com久久爱| 在线观看日韩av先锋影音电影院| 国产99久久精品| 972aa.com艺术欧美| 国产高清不卡一区| 色婷婷国产精品| 日韩写真欧美这视频| 欧美伊人精品成人久久综合97| 国产成人小视频| 色香蕉成人二区免费| 欧美日韩国产一区| 久久综合色之久久综合| 亚洲免费在线电影| 激情综合色丁香一区二区| 99re在线精品| 欧美一级日韩免费不卡| 成人福利视频网站| 成人午夜av影视| 国产三级一区二区三区| 欧美肥妇free| 亚洲国产高清aⅴ视频| 亚洲女厕所小便bbb| 蜜臀精品一区二区三区在线观看| 亚洲人成亚洲人成在线观看图片| 国产精品网站导航| 日日摸夜夜添夜夜添亚洲女人| 亚洲精品免费一二三区| 久久www免费人成看片高清| 色激情天天射综合网| 国产亚洲综合性久久久影院| 亚洲一区二区视频在线观看| 国产99精品国产| 538在线一区二区精品国产| ...av二区三区久久精品| 久久国产欧美日韩精品| 精品一区二区三区在线播放视频 | 日韩精品专区在线| 一区二区三区国产| 99久久综合99久久综合网站| 久久亚洲精品小早川怜子| 日本伊人精品一区二区三区观看方式 | 久久日韩粉嫩一区二区三区| 夜夜嗨av一区二区三区四季av| 亚洲自拍另类综合| 成人精品视频一区二区三区 | 国内欧美视频一区二区| 欧美日韩精品欧美日韩精品一| 亚洲综合丝袜美腿| 久久久久久久综合| 一本到不卡精品视频在线观看| 欧美精品v国产精品v日韩精品| 精品国产乱码久久久久久1区2区| 欧美一区二区三区视频免费 | 国产乱国产乱300精品| 欧美一级日韩免费不卡| 天天综合色天天| 欧美日韩情趣电影| 免费一级片91| 91精品福利在线一区二区三区 | 亚洲国产视频直播| 在线视频亚洲一区| 伊人性伊人情综合网| 在线观看不卡一区| 亚洲va欧美va国产va天堂影院| 国产资源在线一区|