/*
* 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
没有合适的资源?快使用搜索试试~ 我知道了~
jxta-src-2.4.1b.zip_jxta
共2654个文件
html:1770个
java:684个
class:86个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 4 浏览量
2022-09-19
13:09:31
上传
评论
收藏 9.36MB ZIP 举报
温馨提示
jxta_src_2.41b jxta 2.41b 最新版源码 from www.jxta.org
资源推荐
资源详情
资源评论
收起资源包目录
jxta-src-2.4.1b.zip_jxta (2654个子文件)
Configurator.class 63KB
ConfiguratorListener.class 26KB
Resource.class 18KB
Util.class 13KB
AbstractConfigurator.class 12KB
ConditionalBuild.class 11KB
Rendezvous.class 9KB
RdvPeerGroup.class 8KB
Message.class 7KB
Profile$Key.class 6KB
RelayProbe.class 6KB
HttpGet.class 6KB
Transport.class 6KB
CheckSrdi.class 6KB
Conversion.class 6KB
Monitor.class 5KB
AutoLoaderListener.class 5KB
Default.class 5KB
Configurator.class 5KB
Profile.class 4KB
Probe.class 4KB
CheckCm.class 4KB
ReflectionServlet.class 3KB
RelayOptimizer.class 3KB
AddressValidator.class 3KB
RelayValidator.class 3KB
Env.class 3KB
Dispatcher.class 3KB
Probe.class 3KB
HttpPost.class 3KB
TCPURLConnection.class 2KB
TcpTransportAddress.class 2KB
Dispatch.class 2KB
PingPong.class 2KB
Configurator$3.class 2KB
Configurator$2.class 2KB
PeerTreeSelectionListener.class 2KB
Address.class 2KB
WRendezvous.class 2KB
MulticastAddress.class 2KB
ReflectionProbe.class 2KB
ResourceManager.class 2KB
ModuleId.class 2KB
CheckCm$EntriesCallback.class 2KB
Trace.class 2KB
TransportTableModel.class 2KB
PublicAddressValidator.class 2KB
Dump.class 1KB
RootCertificateValidator.class 1KB
NoRelayValidator.class 1KB
HttpTransport.class 1KB
Configurator$4.class 1KB
TcpTransport.class 1KB
WRendezvous$WindowEventsListener.class 1KB
BaseOptimizer.class 1KB
BaseProperty.class 1KB
HttpTransportTableModel.class 1KB
Protocol.class 1KB
TcpTransportTableModel.class 1KB
EdgeOptimizer.class 1KB
Dispatch$1.class 1KB
PublicAddress.class 1007B
TransportValidator.class 957B
Transport$Scheme.class 936B
UIConfigurator.class 930B
ProfileComboModel.class 915B
TcpAddressComboModel.class 914B
ConditionalBuild$StaticField.class 858B
TCPURLStreamHandlerFactory.class 804B
ConfigTreeModel.class 770B
ResourceNotFoundException.class 768B
Tag.class 767B
ConversionException.class 750B
Configurator$1.class 750B
ProxyAddress.class 729B
CheckSrdi$1.class 668B
Dump$DisplayDump.class 666B
DispatchTimerTask.class 603B
TCPURLStreamHandler.class 550B
Main.class 521B
TraceComboModel.class 472B
Dispatchable.class 397B
Property.class 242B
Validator.class 229B
WRendezvous$1.class 222B
Optimizer.class 214B
stylesheet.css 1KB
stylesheet.css 1KB
SwingUI.form 30KB
inherit.gif 57B
inherit.gif 57B
index-all.html 2.18MB
index-all.html 761KB
constant-values.html 300KB
overview-tree.html 192KB
Configurator.html 169KB
GenericPeerGroup.html 122KB
NetworkConfigurator.html 118KB
JxtaSocket.html 113KB
RendezVousServiceImpl.html 104KB
共 2654 条
- 1
- 2
- 3
- 4
- 5
- 6
- 27
资源评论
寒泊
- 粉丝: 74
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功