/*
* 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.1.tar.gz_jxta
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 62 浏览量
2022-09-14
14:47:02
上传
评论
收藏 6.1MB GZ 举报
温馨提示
共2000个文件
html:1770个
java:684个
class:86个
JXTA源文件,需要运行JXTA平台所需的所有源码
资源推荐
资源详情
资源评论
收起资源包目录
jxta-src-2.4.1.tar.gz_jxta (2000个子文件)
stylesheet.css 1KB
stylesheet.css 1KB
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
EndpointRouter.html 101KB
PeerGroupInterface.html 101KB
EndpointServiceImpl.html 98KB
TransportBindingMetric.html 97KB
RendezVousServiceInterface.html 97KB
Profile.Key.html 94KB
PeerGroup.html 93KB
Resource.html 92KB
DiscoveryServiceImpl.html 90KB
EndpointServiceInterface.html 89KB
JxtaBiDiPipe.html 87KB
ConfigDialog.html 87KB
LightWeightPeerGroup.html 83KB
Messenger.html 80KB
PeerGroup.html 78KB
Message.html 76KB
ConfigDialog.IPTptPanel.html 74KB
Element.html 74KB
constant-values.html 74KB
ConfigDialog.BorderPanelGBL.html 73KB
DocumentSerializableUtilities.html 72KB
PipeAdvertisement.html 71KB
RendezVousServiceProvider.html 71KB
DiscoveryServiceInterface.html 70KB
allclasses-frame.html 69KB
BTree.html 69KB
ConfigDialog.HostPortPanel.html 67KB
ConfigDialog.HostListPanel.html 67KB
MimeMediaType.html 67KB
ConfigDialog.IdPanel.html 66KB
RendezVousService.html 66KB
TcpTransport.html 66KB
ConfigDialog.IfAddrPanel.html 66KB
ConfigDialog.RelayPanel.html 66KB
ID.html 65KB
LiteXMLDocument.html 65KB
ConfigDialog.DebugPanel.html 65KB
BlockingMessenger.html 65KB
ConfigDialog.PagesPanel.html 64KB
PeerInfoServiceImpl.html 64KB
PeerInfoServiceInterface.html 64KB
ConfigDialog.EnablingPanel.html 64KB
JxtaServerSocket.html 64KB
ConfigDialog.PanelGBL.html 64KB
ConfigDialog.RdvPanel.html 64KB
PeerGroupID.html 62KB
Message.html 62KB
CbJxTransport.html 62KB
StructuredDocument.html 62KB
RendezvousMetric.html 61KB
GenericServiceMonitor.html 61KB
PSEMembershipService.html 61KB
ProxyService.html 61KB
IDFactory.html 60KB
allclasses-noframe.html 60KB
TlsTransport.html 59KB
EndpointService.html 59KB
StdPeerGroup.html 59KB
AbstractMessenger.html 58KB
RouteAdvertisement.html 58KB
AbstractConfigurator.html 57KB
FaultCodes.html 57KB
RelayTransport.html 57KB
AdvertisementUtilities.html 57KB
RdvPeerRdvService.html 57KB
BTreeFiler.html 57KB
Instantiator.html 57KB
overview-tree.html 56KB
Instantiator.html 56KB
QueryHandlerMetric.html 56KB
PSECredential.html 56KB
PeerView.html 56KB
Instantiator.html 56KB
Paged.html 56KB
PeerID.html 56KB
EdgePeerRdvService.html 56KB
Default.html 56KB
AdhocPeerRdvService.html 56KB
MonitorResources.html 55KB
RefCountPeerGroupInterface.html 55KB
AsyncChannelMessenger.html 54KB
Instantiator.html 54KB
RdvPeerGroup.html 54KB
DiscoveryService.html 54KB
LiteXMLElement.html 54KB
RdvConfigAdv.html 53KB
MonitorManager.html 52KB
RemoteMonitorResponse.html 52KB
DOMXMLDocument.html 52KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
alvarocfc
- 粉丝: 105
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功