📄 peergroup.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>PeerGroup (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.peergroup.PeerGroup interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="PeerGroup (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/PeerGroup.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/Configurator.html" title="interface in net.jxta.peergroup"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="PeerGroup.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: <A HREF="#nested_class_summary">NESTED</A> | <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>Interface PeerGroup</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A>, <A HREF="../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></DD></DL><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../net/jxta/impl/peergroup/RefPeerGroup.html" title="interface in net.jxta.impl.peergroup">RefPeerGroup</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/jxta/impl/peergroup/GenericPeerGroup.html" title="class in net.jxta.impl.peergroup">GenericPeerGroup</A>, <A HREF="../../../net/jxta/peergroup/LightWeightPeerGroup.html" title="class in net.jxta.peergroup">LightWeightPeerGroup</A>, <A HREF="../../../net/jxta/impl/peergroup/PeerGroupInterface.html" title="class in net.jxta.impl.peergroup">PeerGroupInterface</A></DD></DL><HR><DL><DT>public interface <B>PeerGroup</B><DT>extends <A HREF="../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></DL><P>Peer groups are formed as a collection of peers that have agreed upon a common set of services. Each peer group is assigned a unique peer group ID and a peer group advertisement. The peer group advertisement contains a ModuleSpecID which refers to a module specification for this peer group. <p>The peer group specification mandates each of the group services (membership, discovery, resolver, etc). Implementations of that specification are described by ModuleImplAdvertisements which are identified by the group's ModuleSpecID. Implementations are responsible for providing the services mandated by the specification. The java reference implementation achieves this by loading additional Modules which ModuleSpecIDs are listed by the group implementation advertisement. <p>In order to participate in a group, a peer needs to join the group using the peer group membership service. <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 instantiate 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 is instantiated 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, instantiate 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><P><DL><DT><B>See Also:</B><DD><A HREF="../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup"><CODE>PeerGroupID</CODE></A>, <A HREF="../../../net/jxta/service/Service.html" title="interface in net.jxta.service"><CODE>Service</CODE></A>, <A HREF="../../../net/jxta/peergroup/PeerGroupFactory.html" title="class in net.jxta.peergroup"><CODE>PeerGroupFactory</CODE></A>, <A HREF="../../../net/jxta/protocol/PeerGroupAdvertisement.html" title="class in net.jxta.protocol"><CODE>PeerGroupAdvertisement</CODE></A>, <A HREF="../../../net/jxta/protocol/ModuleImplAdvertisement.html" title="class in net.jxta.protocol"><CODE>ModuleImplAdvertisement</CODE></A>, <A HREF="../../../net/jxta/platform/ModuleSpecID.html" title="class in net.jxta.platform"><CODE>ModuleSpecID</CODE></A>, <A HREF="../../../net/jxta/platform/ModuleClassID.html" title="class in net.jxta.platform"><CODE>ModuleClassID</CODE></A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><A NAME="nested_class_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Nested Class Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.GlobalRegistry.html" title="class in net.jxta.peergroup">PeerGroup.GlobalRegistry</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.IdMaker.html" title="class in net.jxta.peergroup">PeerGroup.IdMaker</A></B></CODE><BR> An inner class used to create static well-known identifiers.</TD></TR></TABLE> <!-- =========== 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 <A HREF="../../../net/jxta/platform/ModuleClassID.html" title="class in net.jxta.platform">ModuleClassID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#accessClassID">accessClassID</A></B></CODE><BR> Well known module class identifier: AccessService</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/platform/ModuleSpecID.html" title="class in net.jxta.platform">ModuleSpecID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#allPurposePeerGroupSpecID">allPurposePeerGroupSpecID</A></B></CODE><BR> Well known group specification identifier: an all purpose peer group specification. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/platform/ModuleClassID.html" title="class in net.jxta.platform">ModuleClassID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#applicationClassID">applicationClassID</A></B></CODE><BR> Well known module class identifier: application</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#Both">Both</A></B></CODE><BR> Look for needed ModuleImplAdvertisement in both this group and its parent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#DEFAULT_EXPIRATION">DEFAULT_EXPIRATION</A></B></CODE><BR> Default expiration time for discovered group advertisements. (2 weeks)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#DEFAULT_LIFETIME">DEFAULT_LIFETIME</A></B></CODE><BR> Default life time for group advertisements in the publisher's cache. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/platform/ModuleClassID.html" title="class in net.jxta.platform">ModuleClassID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#discoveryClassID">discoveryClassID</A></B></CODE><BR> Well known module class identifier: discovery service</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/platform/ModuleClassID.html" title="class in net.jxta.platform">ModuleClassID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#endpointClassID">endpointClassID</A></B></CODE><BR> Well known module class identifier: endpoint service</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#FromParent">FromParent</A></B></CODE><BR> Look for needed ModuleImplAdvertisement in the parent group of this group.</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.GlobalRegistry.html" title="class in net.jxta.peergroup">PeerGroup.GlobalRegistry</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#globalRegistry">globalRegistry</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#Here">Here</A></B></CODE><BR> Look for needed ModuleImplAdvertisement in this group.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/platform/ModuleClassID.html" title="class in net.jxta.platform">ModuleClassID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#httpProtoClassID">httpProtoClassID</A></B></CODE><BR> Well known module class identifier: http protocol</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/platform/ModuleClassID.html" title="class in net.jxta.platform">ModuleClassID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/peergroup/PeerGroup.html#membershipClassID">membershipClassID</A></B></CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -