⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 genericpeergroup.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#initLast()">initLast</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Perform all initialization steps that need to be performed after any subclass initialization is performed. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#isRendezvous()">isRendezvous</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the whether the group member is a Rendezvous peer for the group</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#loadModule(net.jxta.id.ID, net.jxta.document.Advertisement)">loadModule</A></B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A>&nbsp;assigned,           <A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A>&nbsp;impl)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Load a module from a ModuleImplAdv. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#loadModule(net.jxta.id.ID, net.jxta.document.Advertisement, boolean)">loadModule</A></B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A>&nbsp;assigned,           <A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A>&nbsp;impl,           boolean&nbsp;privileged)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Internal version, allows one to make a privileged module (has a ref to the true group obj instead of just an interface. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#loadModule(net.jxta.id.ID, net.jxta.platform.ModuleSpecID, int)">loadModule</A></B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A>&nbsp;assigned,           <A HREF="../../../../net/jxta/platform/ModuleSpecID.html" title="class in net.jxta.platform">ModuleSpecID</A>&nbsp;specID,           int&nbsp;where)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Load a module from a spec id. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#loadModule(net.jxta.id.ID, net.jxta.platform.ModuleSpecID, int, boolean)">loadModule</A></B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A>&nbsp;assigned,           <A HREF="../../../../net/jxta/platform/ModuleSpecID.html" title="class in net.jxta.platform">ModuleSpecID</A>&nbsp;specID,           int&nbsp;where,           boolean&nbsp;privileged)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Load a module from a spec id. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#lookupService(net.jxta.id.ID)">lookupService</A></B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A>&nbsp;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Call a service by name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<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/impl/peergroup/GenericPeerGroup.html#newGroup(net.jxta.document.Advertisement)">newGroup</A></B>(<A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A>&nbsp;pgAdv)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instantiate a peer group from its given advertisement. This instantiator  requires that the ModuleImplAdvertisment for the peer group and the  ModuleImplAdvertisements for the group's services be available for  discovery within the current group.  <p/>The pgAdv itself may be all new and unpublished. Therefore, the two  typical uses of this routine are: <ul> <li>Creating an all new group with a new ID while using an existing and published implementation. (Possibly a new one published for that purpose). The information should first be gathered in a new PeerGroupAdvertisement which is then passed to this method.</li> <li>Instantiating a group which advertisement has already been discovered (therefore there is no need to find it by groupID again).</li> </ul> <p/>To create a group from a known implAdv, use <A HREF="../../../../net/jxta/peergroup/PeerGroup.html#newGroup(net.jxta.peergroup.PeerGroupID, net.jxta.document.Advertisement, java.lang.String, java.lang.String)"><CODE>PeerGroup.newGroup(PeerGroupID,Advertisement,String,String)</CODE></A></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<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/impl/peergroup/GenericPeerGroup.html#newGroup(net.jxta.peergroup.PeerGroupID)">newGroup</A></B>(<A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A>&nbsp;gid)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instantiate a group from its Peer Group ID only. Use this when using a group that has already been published and discovered. <p/>The typical uses of this routine are therefore: <ul>   <li>Instantiating a peer group which is assumed to exist and whose Peer   Group ID is already known.</li>   <li>Creating a new peer group instance using an already published   Group advertisement, typically published for that purpose. All other   referenced advertisements must also be available.</li> </ul> <p/>To create a group from a known implAdv, just use <A HREF="../../../../net/jxta/peergroup/PeerGroup.html#loadModule(net.jxta.id.ID, net.jxta.document.Advertisement)"><CODE>PeerGroup.loadModule(ID,Advertisement)</CODE></A> or even:<p> <p/><code> grp = new GroupSubClass(); grp.init(parentGroup, gid, impladv); </code> <p/>then, <strong>REMEMBER TO PUBLISH THE GROUP IF IT IS ALL NEW.</strong></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<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/impl/peergroup/GenericPeerGroup.html#newGroup(net.jxta.peergroup.PeerGroupID, net.jxta.document.Advertisement, java.lang.String, java.lang.String)">newGroup</A></B>(<A HREF="../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A>&nbsp;gid,         <A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A>&nbsp;impl,         java.lang.String&nbsp;name,         java.lang.String&nbsp;description)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Instantiates a new group from its elementary pieces and publishes the corresponding PeerGroupAdvertisement. The pieces are: the groups implementation adv, the group id, the name and description. <p/>The typical use of this routine is creating a whole new group based on a newly created and possibly unpublished implementation adv. <p/>This is a convenience method equivalent to either: <p/><pre> newGrp = thisGroup.loadModule(gid, impl); newGrp.publishGroup(name, description); </pre> <p/>or, but only if the implementation advertisement has been published: <p/><pre> newPGAdv = AdvertisementFactory.newAdvertisement(                 PeerGroupAdvertisement.getAdvertisementType()); newPGAdv.setPeerGroupID(gid); newPGAdv.setModuleSpecID(impl.getModuleSpecID()); newPGAdv.setName(name); newPGAdv.setDescription(description); newGrp = thisGroup.newGroup(newPGAdv); </pre></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#publishGroup(java.lang.String, java.lang.String)">publishGroup</A></B>(java.lang.String&nbsp;name,             java.lang.String&nbsp;description)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Publish this group's Peer Group Advertisment if it has not already been published. The Peer Group Advertisement is published into the Peer Group in which this group was instantiated, specifically the Peer Group whose <code>newGroup()</code> was called. <p/>Calling this method is only useful if the group is being created from scratch and the PeerGroup advertisement has not been created beforehand. In such a case, the group has never been named or described. Therefore this information has to be supplied here. <p/>If this group has already been previously published, this method does nothing.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#removeService(net.jxta.platform.ModuleClassID, net.jxta.service.Service)">removeService</A></B>(<A HREF="../../../../net/jxta/platform/ModuleClassID.html" title="class in net.jxta.platform">ModuleClassID</A>&nbsp;name,              <A HREF="../../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A>&nbsp;service)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ask a group to unregister and unload a service</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#setConfigAdvertisement(net.jxta.protocol.ConfigParams)">setConfigAdvertisement</A></B>(<A HREF="../../../../net/jxta/protocol/ConfigParams.html" title="class in net.jxta.protocol">ConfigParams</A>&nbsp;config)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{@inheritDoc}</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#setJxtaLoader(net.jxta.platform.JxtaLoader)">setJxtaLoader</A></B>(<A HREF="../../../../net/jxta/platform/JxtaLoader.html" title="class in net.jxta.platform">JxtaLoader</A>&nbsp;newLoader)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a modified version of the Jxta ClassLoader</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#startApp(java.lang.String[])">startApp</A></B>(java.lang.String[]&nbsp;arg)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start the peergroup. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#stopApp()">stopApp</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stops the group and all its services. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/peergroup/GenericPeerGroup.html#unref()">unref</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;May be called by a module which has a direct reference to the group object and wants to notify its abandoning it. </TD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -