📄 peergroupfactory.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>PeerGroupFactory (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.peergroup.PeerGroupFactory class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="PeerGroupFactory (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/PeerGroupFactory.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/peergroup/PeerGroup.IdMaker.html" title="class in net.jxta.peergroup"><B>PREV CLASS</B></A> <A HREF="../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup"><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="PeerGroupFactory.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 | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <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.peergroup</FONT><BR>Class PeerGroupFactory</H2><PRE>java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>net.jxta.peergroup.PeerGroupFactory</B></PRE><HR><DL><DT>public final class <B>PeerGroupFactory</B><DT>extends java.lang.Object</DL><P>Factory Classes to create a new Peer Platform and New PeerGroups. This class is used by Jxta applications to create new groups <p/> JXTA comes with two subclasses of peer groups: <ul type-disc> <li> <strong>Platform</strong>: this is used to represent the <em>World</em> group. Every peer, when booting, becomes part of this group. This group provides the minimum core services needed to find and instanciate other groups on a peer. <strong>Platform</strong> has the privilege of assigning a new ID to the peer, if it does not already have one. The <em>World</em> group's ID is invariant.</li> <li> <strong>StdPeergroup</strong>: this is currently used to implement all other kinds of peer groups. The first such group that it is instanciated after booting is known as <em>The Net Peer Group</em>. When <strong>Platform</strong> starts it may optionaly search for <em>The Net Peer Group</em> on the local network and, if found, instanciate it. Otherwise a default configuration of <em>The Net Peer Group</em> is instanciated. A non-default configuration of <em>The Net Peer Group</em> may be set-up by the administrator in charge of the network domain inside which the peer is booting. <em>The Net Peer Group</em> is discovered via the DiscoveryService protocol. Many such groups may be configured by an administrator.<br> <strong>StdPeergroup</strong> may also be used to implement User-defined peer groups: Users can create new peer groups which use their own set of customized services.</li></ul> <p/>The Platform group is created via the <b>newPlatform</b> method. The Net Peer Group and user Peer Groups are created via the <b>newPeerGroup</b> method.<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup"><CODE>PeerGroup</CODE></A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.Class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#DEFAULT_CONFIGURATOR">DEFAULT_CONFIGURATOR</A></B></CODE><BR> Constant for specifying the default configurator.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.Class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#NULL_CONFIGURATOR">NULL_CONFIGURATOR</A></B></CODE><BR> Constant for specifying no configurator.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== 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>static java.lang.Class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#getConfiguratorClass()">getConfiguratorClass</A></B>()</CODE><BR> Static Method to get the configurator</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#newNetPeerGroup()">newNetPeerGroup</A></B>()</CODE><BR> Creates a default platform peergroup, from which a new netpeergroug is created. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#newNetPeerGroup(net.jxta.peergroup.PeerGroup)">newNetPeerGroup</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> pg)</CODE><BR> Until the concept of netPeerGroup is better integrated, we need something straightforward so that applications that whish to control the start-up process can easily bring up a netPeerGroup like startNetPeerGroup does. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#newPeerGroup()">newPeerGroup</A></B>()</CODE><BR> Static Method to create a new peer group instance. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#newPlatform()">newPlatform</A></B>()</CODE><BR> Static Method to create a new peer Plaform The init() method is called automatically. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#setConfiguratorClass(java.lang.Class)">setConfiguratorClass</A></B>(java.lang.Class c)</CODE><BR> Static Method to set the configurator</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#setNetPGDesc(java.lang.String)">setNetPGDesc</A></B>(java.lang.String desc)</CODE><BR> Static Method to initialize the default net PG description</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#setNetPGID(net.jxta.peergroup.PeerGroupID)">setNetPGID</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> id)</CODE><BR> Static Method to initialize the default net PG ID</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#setNetPGName(java.lang.String)">setNetPGName</A></B>(java.lang.String name)</CODE><BR> Static Method to initialize the default net PG name</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#setPlatformClass(java.lang.Class)">setPlatformClass</A></B>(java.lang.Class c)</CODE><BR> Static Method to initialize the Platform peergroup class</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html#setStdPeerGroupClass(java.lang.Class)">setStdPeerGroupClass</A></B>(java.lang.Class c)</CODE><BR> Static Method to initialize the std peer group class</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -