📄 configurator.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>Configurator (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.ext.config.Configurator class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="Configurator (Project JXTA J2SE)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Configurator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><a href='http://www.jxta.org' target='_blank'>Project JXTA</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../net/jxta/ext/config/Address.html" title="class in net.jxta.ext.config"><B>PREV CLASS</B></A> <A HREF="../../../../net/jxta/ext/config/Conversion.html" title="class in net.jxta.ext.config"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="Configurator.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">net.jxta.ext.config</FONT><BR>Class Configurator</H2><PRE>java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>net.jxta.ext.config.Configurator</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.io.Externalizable, java.io.Serializable</DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../net/jxta/ext/config/TrivialConfigurator.html" title="class in net.jxta.ext.config">TrivialConfigurator</A></DD></DL><HR><DL><DT>public class <B>Configurator</B><DT>extends java.lang.Object<DT>implements java.io.Externalizable</DL><P>A JXTA configurator.<br> <br> <code>Configurator<code> serves primarily as a JXTA property sheet and implements very little attribute association logic beyond that of what is required to perform integrity validation and address expansion. To the latter, All addresses are of the form URI. Addresses that do not specify a scheme will default accordingly. Further, <code>RendezVous</code> and <code>Relay</code> addresses that do not specify a host wil be replaced with the corresponding boostrap results. If a scheme is specified only bootstrap results with matching schemes will be maintained. All other addresses that do not specify a host will, in turn, be replaced with the local host. All fields have backing defaults enabling one to seed a configuration with a partial yet valid resource file.<br> <br> Configurator will parse an existing <CODE>PlatformConfig</CODE> if one exists in the specified <A HREF="../../../../net/jxta/ext/config/Env.html#JXTA_HOME"><CODE>JXTA home</CODE></A> directory. If this is not the case, a <A HREF="../../../../net/jxta/ext/config/Env.html#PROFILE"><CODE>Configuration</CODE></A> file will be parsed it one such file exists. Lastly, if neither of the above are resolvable the <CODE>Default profile</CODE> will be used to seed the newly created instance.<br> <br> Resulting <code>PlatformConfig</code> instances can then be retrieved or persisted upon passing the integrity validation checks.<P><P><DL><DT><B>Version:</B></DT> <DD>$Id: Configurator.java,v 1.158.4.3 2004/02/27 22:38:36 gonzo Exp $</DD><DT><B>Author:</B></DT> <DD>james todd [gonzo at jxta dot org]</DD><DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#net.jxta.ext.config.Configurator">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#Configurator()">Configurator</A></B>()</CODE><BR> Constructor for the Configurator object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#Configurator(net.jxta.impl.protocol.PlatformConfig)">Configurator</A></B>(<A HREF="../../../../net/jxta/impl/protocol/PlatformConfig.html" title="class in net.jxta.impl.protocol">PlatformConfig</A> config)</CODE><BR> Constructor for the Configurator object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#Configurator(net.jxta.ext.config.Profile)">Configurator</A></B>(<A HREF="../../../../net/jxta/ext/config/Profile.html" title="class in net.jxta.ext.config">Profile</A> profile)</CODE><BR> Constructor for the Configurator object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#Configurator(java.lang.String, java.lang.String)">Configurator</A></B>(java.lang.String principal, java.lang.String password)</CODE><BR> Constructor for the Configurator object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#Configurator(java.lang.String, java.lang.String, java.lang.String)">Configurator</A></B>(java.lang.String name, java.lang.String principal, java.lang.String password)</CODE><BR> Constructor for the Configurator object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#Configurator(java.lang.String, java.lang.String, java.lang.String, java.lang.String)">Configurator</A></B>(java.lang.String name, java.lang.String description, java.lang.String principal, java.lang.String password)</CODE><BR> Constructor for the Configurator object.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#addRelay(java.net.URI)">addRelay</A></B>(java.net.URI relay)</CODE><BR> Adds a <code>Relay</code> address.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#addRelays(java.util.List)">addRelays</A></B>(java.util.List relays)</CODE><BR> Adds <code>Relay</code> addresses.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#addRendezVous(java.util.List)">addRendezVous</A></B>(java.util.List rendezVous)</CODE><BR> Adds <code>RendezVous</code> addresses.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#addRendezVous(java.net.URI)">addRendezVous</A></B>(java.net.URI rendezVous)</CODE><BR> Adds a <code>RendezVous</code> address.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#addTransport(net.jxta.ext.config.Transport)">addTransport</A></B>(<A HREF="../../../../net/jxta/ext/config/Transport.html" title="class in net.jxta.ext.config">Transport</A> transport)</CODE><BR> Adds a feature to the Transport attribute of the Configurator object</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#addTransports(java.util.List)">addTransports</A></B>(java.util.List transports)</CODE><BR> Adds a feature to the Transports attribute of the Configurator object</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#clearRelays()">clearRelays</A></B>()</CODE><BR> Remove all <code>Relay</code> addresses.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#clearRendezVous()">clearRendezVous</A></B>()</CODE><BR> Remove all <code>RendezVous</code> addresses.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#clearTransports()">clearTransports</A></B>()</CODE><BR> Description of the Method</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.util.List</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#fetchBootstrapAddresses(java.net.URI)">fetchBootstrapAddresses</A></B>(java.net.URI u)</CODE><BR> Retrieve the specified bootstrap file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.List</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#fetchRelaysBootstrapAddresses()">fetchRelaysBootstrapAddresses</A></B>()</CODE><BR> Description of the Method</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.List</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#fetchRendezVousBootstrapAddresses()">fetchRendezVousBootstrapAddresses</A></B>()</CODE><BR> Description of the Method</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/ext/config/Configurator.html#getDescription()">getDescription</A></B>()</CODE><BR> Gets the <code>Peer</code> description.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -