📄 refcountpeergroupinterface.html
字号:
</DL><HR><A NAME="getLoader()"><!-- --></A><H3>getLoader</H3><PRE>public <A HREF="../../../../net/jxta/platform/JxtaLoader.html" title="class in net.jxta.platform">JxtaLoader</A> <B>getLoader</B>()</PRE><DL><DD>Returns the loader for this group.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html#getLoader()">getLoader</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>JxtaLoader The loader</DL></DD></DL><HR><A NAME="isRendezvous()"><!-- --></A><H3>isRendezvous</H3><PRE>public boolean <B>isRendezvous</B>()</PRE><DL><DD>Returns the whether the group member is a Rendezvous peer for the group<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html#isRendezvous()">isRendezvous</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>boolean true if the peer is a rendezvous for the group.</DL></DD></DL><HR><A NAME="getPeerGroupAdvertisement()"><!-- --></A><H3>getPeerGroupAdvertisement</H3><PRE>public <A HREF="../../../../net/jxta/protocol/PeerGroupAdvertisement.html" title="class in net.jxta.protocol">PeerGroupAdvertisement</A> <B>getPeerGroupAdvertisement</B>()</PRE><DL><DD>Return the PeerGroupAdvertisement for this group.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html#getPeerGroupAdvertisement()">getPeerGroupAdvertisement</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>PeerGroupAdvertisement this Group's advertisement.</DL></DD></DL><HR><A NAME="getPeerAdvertisement()"><!-- --></A><H3>getPeerAdvertisement</H3><PRE>public <A HREF="../../../../net/jxta/protocol/PeerAdvertisement.html" title="class in net.jxta.protocol">PeerAdvertisement</A> <B>getPeerAdvertisement</B>()</PRE><DL><DD>Return the PeerAdvertisement of the local Peer within this Peer Group.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html#getPeerAdvertisement()">getPeerAdvertisement</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the PeerAdvertisement of the local Peer within this Peer Group.</DL></DD></DL><HR><A NAME="lookupService(net.jxta.id.ID)"><!-- --></A><H3>lookupService</H3><PRE>public <A HREF="../../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A> <B>lookupService</B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A> name) throws <A HREF="../../../../net/jxta/exception/ServiceNotFoundException.html" title="class in net.jxta.exception">ServiceNotFoundException</A></PRE><DL><DD>Lookup for a service by name.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html#lookupService(net.jxta.id.ID)">lookupService</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the service identifier.<DT><B>Returns:</B><DD>Service, the Service registered by that name<DT><B>Throws:</B><DD><CODE><A HREF="../../../../net/jxta/exception/ServiceNotFoundException.html" title="class in net.jxta.exception">ServiceNotFoundException</A></CODE> - could not find the service requested</DL></DD></DL><HR><A NAME="compatible(net.jxta.document.Element)"><!-- --></A><H3>compatible</H3><PRE>public boolean <B>compatible</B>(<A HREF="../../../../net/jxta/document/Element.html" title="interface in net.jxta.document">Element</A> compat)</PRE><DL><DD>Return true if the provided compatibility statement is compatible with this group.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html#compatible(net.jxta.document.Element)">compatible</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>boolean True if the statement is compatible.</DL></DD></DL><HR><A NAME="loadModule(net.jxta.id.ID, net.jxta.document.Advertisement)"><!-- --></A><H3>loadModule</H3><PRE>public <A HREF="../../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A> <B>loadModule</B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A> assignedID, <A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> impl) throws <A HREF="../../../../net/jxta/exception/ProtocolNotSupportedException.html" title="class in net.jxta.exception">ProtocolNotSupportedException</A>, <A HREF="../../../../net/jxta/exception/PeerGroupException.html" title="class in net.jxta.exception">PeerGroupException</A></PRE><DL><DD>Load a module from a ModuleImplAdv. Compatibility is checked and load is attempted. If compatible and loaded successfuly, the resulting Module is initialized and returned. In most cases the other loadModule() method should be preferred, since unlike this one, it will seek many compatible implementation advertisements and try them all until one works. The home group of the new module (its parent group if the new module is a group) will be this group.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html#loadModule(net.jxta.id.ID, net.jxta.document.Advertisement)">loadModule</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>assignedID</CODE> - Id to be assigned to that module (usually its ClassID).<DD><CODE>impl</CODE> - An implementation advertisement for that module.<DT><B>Returns:</B><DD>Module the module loaded and initialized.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../net/jxta/exception/ProtocolNotSupportedException.html" title="class in net.jxta.exception">ProtocolNotSupportedException</A></CODE> - The module is a protocol and is disabled per the peer's configuration.<DD><CODE><A HREF="../../../../net/jxta/exception/PeerGroupException.html" title="class in net.jxta.exception">PeerGroupException</A></CODE> - The module could not be loaded or initialized</DL></DD></DL><HR><A NAME="loadModule(net.jxta.id.ID, net.jxta.platform.ModuleSpecID, int)"><!-- --></A><H3>loadModule</H3><PRE>public <A HREF="../../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A> <B>loadModule</B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A> assignedID, <A HREF="../../../../net/jxta/platform/ModuleSpecID.html" title="class in net.jxta.platform">ModuleSpecID</A> specID, int where)</PRE><DL><DD>Load a module from a spec id. Advertisement is sought, compatibility is checked on all candidates and load is attempted. The first one that is compatible and loads successfuly is initialized and returned.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html#loadModule(net.jxta.id.ID, net.jxta.platform.ModuleSpecID, int)">loadModule</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>assignedID</CODE> - Id to be assigned to that module (usually its ClassID).<DD><CODE>specID</CODE> - The specID of this module.<DD><CODE>where</CODE> - May be one of: Here, FromParent, or Both, meaning that the implementation advertisement will be searched in this group, its parent or both. As a general guideline, the implementation advertisements of a group should be searched in its propsective parent (that is Here), the implementation advertisements of a group standard service should be searched in the same group than where this group's advertisement was found (that is, FromParent), while applications may be sought more freely (Both).<DT><B>Returns:</B><DD>Module the new module, or null if no usuable implementation was found.</DL></DD></DL><HR><A NAME="publishGroup(java.lang.String, java.lang.String)"><!-- --></A><H3>publishGroup</H3><PRE>public void <B>publishGroup</B>(java.lang.String name, java.lang.String description) throws java.io.IOException</PRE><DL><DD>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.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html#publishGroup(java.lang.String, java.lang.String)">publishGroup</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of this group.<DD><CODE>description</CODE> - The description of this group.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - The publication could not be accomplished because of a network or storage failure.</DL></DD></DL><HR><A NAME="newGroup(net.jxta.document.Advertisement)"><!-- --></A><H3>newGroup</H3><PRE>public <A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> <B>newGroup</B>(<A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> pgAdv) throws <A HREF="../../../../net/jxta/exception/PeerGroupException.html" title="class in net.jxta.exception">PeerGroupException</A></PRE><DL><DD>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><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peergroup/PeerGroup.html#newGroup(net.jxta.document.Advertis
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -