📄 discoveryserviceinterface.html
字号:
Returns the advertisment for this service.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <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/discovery/DiscoveryServiceInterface.html#getInterface()">getInterface</A></B>()</CODE><BR> Service objects are not manipulated directly to protect usage of the service. A Service interface is returned to access the service methods.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/discovery/DiscoveryServiceInterface.html#getLocalAdvertisements(int, java.lang.String, java.lang.String)">getLocalAdvertisements</A></B>(int type, java.lang.String attribute, java.lang.String value)</CODE><BR> Retrieve Stored Peer, Group, and General Advertisements</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/discovery/DiscoveryServiceInterface.html#getRemoteAdvertisements(java.lang.String, int, java.lang.String, java.lang.String, int)">getRemoteAdvertisements</A></B>(java.lang.String peer, int type, java.lang.String attribute, java.lang.String value, int threshold)</CODE><BR> This method discovers PeerAdvertisements, GroupAdvertisements and other jxta Advertisements. jxta Advertisements are documents that describe pipes, services, etc. The discovery scope can be narrowed down firstly by Name and Value pair where the match is an exact match, secondly by setting a upper limit where the responding peer will not exceed. Discovery can be performed in two ways 1. by specifying a null peerid, the discovery message is propagated on the local sub-net utilizing ip multicast. In addition to the multicast it is also propagated to rendezvous points. 2. by passing a peerid, the EndpointRouter will attempt to resolve destination peer's endpoints or route the message to other routers in attempt to reach the peer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/discovery/DiscoveryServiceInterface.html#getRemoteAdvertisements(java.lang.String, int, java.lang.String, java.lang.String, int, net.jxta.discovery.DiscoveryListener)">getRemoteAdvertisements</A></B>(java.lang.String peer, int type, java.lang.String attribute, java.lang.String value, int threshold, <A HREF="../../../../net/jxta/discovery/DiscoveryListener.html" title="interface in net.jxta.discovery">DiscoveryListener</A> listener)</CODE><BR> This method discovers PeerAdvertisements, GroupAdvertisements and jxta Advertisements. jxta Advertisements are documents that describe pipes, services, etc. The discovery scope can be narrowed down firstly by Name and Value pair where the match is an exact match, secondly by setting a upper limit where the responding peer will not exceed. DiscoveryServiceImpl can be performed in two ways 1. by specifying a null peerid, the discovery message is propagated on the local sub-net utilizing ip multicast. In addition to the multicast it is also propagated to rendezvous points. 2. by passing a peerid, the EndpointRouter will attempt to resolve destination peer's endpoints or route the message to other routers in attempt to reach the peer.</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/impl/discovery/DiscoveryServiceInterface.html#init(net.jxta.peergroup.PeerGroup, net.jxta.id.ID, net.jxta.document.Advertisement)">init</A></B>(<A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> pg, <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)</CODE><BR> Initialize the module, passing it its peer group and advertisement. <p/>Note: when subclassing one of the existing PeerGroup implementations (which implement Module), it may not be recommended to overload the init method. See the documentation of the PeerGroup class being subclassed. <p/>FIXME: This is meaningless for the interface object; it is there only to satisfy the requirements of the interface that we implement. </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/impl/discovery/DiscoveryServiceInterface.html#publish(net.jxta.document.Advertisement)">publish</A></B>(<A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv)</CODE><BR> Publish an advertisement with a default lifetime of <code> DEFAULT_LIFETIME</code> and default expiration time for "others" of <code>DEFAULT_EXPIRATION</code> Advertisement indexes are shared with a rendezvous peer upon connect, and subsequent publications are shared at a an implementation specified interval</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/impl/discovery/DiscoveryServiceInterface.html#publish(net.jxta.document.Advertisement, int)">publish</A></B>(<A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv, int type)</CODE><BR> Publish an advertisement with a default lifetime of <code> DEFAULT_LIFETIME</code> and default expiration time for "others" of <code>DEFAULT_EXPIRATION</code> Advertisement indexes are shared with a rendezvous peer upon connect, and subsequent publications are shared at a an implementation specified interval</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/impl/discovery/DiscoveryServiceInterface.html#publish(net.jxta.document.Advertisement, int, long, long)">publish</A></B>(<A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv, int type, long lifetime, long lifetimeForOthers)</CODE><BR> Publish an advertisement that will expire after a certain time. A node that finds this advertisement will hold it for about <i> lifetimeForOthers</i> milliseconds, or <i>lifetime</i> whichever is smaller Advertisement indexes are shared with a rendezvous peer upon connect, and subsequent publications are shared at an implementation specified interval</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/impl/discovery/DiscoveryServiceInterface.html#publish(net.jxta.document.Advertisement, long, long)">publish</A></B>(<A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv, long lifetime, long lifetimeForOthers)</CODE><BR> Publish an advertisement that will expire after a certain time. A node that finds this advertisement will hold it for about <i> lifetimeForOthers</i> milliseconds, or <i>lifetime</i> whichever is smaller Advertisement indexes are shared with a rendezvous peer upon connect, and subsequent publications are shared at an implementation specified interval</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/impl/discovery/DiscoveryServiceInterface.html#remotePublish(net.jxta.document.Advertisement)">remotePublish</A></B>(<A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv)</CODE><BR> Remote Publish an advertisement will attempt to remote publish adv on all configured transports, the Advertisement will carry a lifetime of Expiration time, or lifetime whichever is smaller</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/impl/discovery/DiscoveryServiceInterface.html#remotePublish(net.jxta.document.Advertisement, int)">remotePublish</A></B>(<A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv, int type)</CODE><BR> Remote Publish an advertisement will attempt to remote publish adv on all configured transports, the Advertisement will carry a lifetime of Expiration time, or lifetime whichever is smaller</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/impl/discovery/DiscoveryServiceInterface.html#remotePublish(net.jxta.document.Advertisement, int, long)">remotePublish</A></B>(<A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv, int type, long lifetime)</CODE><BR> Remote Publish an advertisement will attempt to remote publish adv on all configured transports, the Advertisement will carry a a expiration of <i> lifetime</i></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/impl/discovery/DiscoveryServiceInterface.html#remotePublish(net.jxta.document.Advertisement, long)">remotePublish</A></B>(<A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv, long lifetime)</CODE><BR> Remote Publish an advertisement will attempt to remote publish adv on all configured transports, the Advertisement will carry a a expiration of <i> lifetime</i></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/impl/discovery/DiscoveryServiceInterface.html#remotePublish(java.lang.String, net.jxta.document.Advertisement)">remotePublish</A></B>(java.lang.String peerid, <A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv)</CODE><BR> Remote Publish an advertisement will attempt to remote publish adv on all configured transports, the Advertisement will carry a lifetime of Expiration time, or lifetime whichever is smaller</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/impl/discovery/DiscoveryServiceInterface.html#remotePublish(java.lang.String, net.jxta.document.Advertisement, int)">remotePublish</A></B>(java.lang.String peerid, <A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv, int type)</CODE><BR> Remote Publish an advertisement will attempt to remote publish adv on all configured transports, the Advertisement will carry a lifetime of Expiration time, or lifetime whichever is smaller</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/impl/discovery/DiscoveryServiceInterface.html#remotePublish(java.lang.String, net.jxta.document.Advertisement, int, long)">remotePublish</A></B>(java.lang.String peerid, <A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv, int type, long lifetime)</CODE><BR> Remote Publish an advertisement will attempt to remote publish adv on all configured transports, the Advertisement will carry a a expiration of <i> lifetime</i></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/impl/discovery/DiscoveryServiceInterface.html#remotePublish(java.lang.String, net.jxta.document.Advertisement, long)">remotePublish</A></B>(java.lang.String peerid, <A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv, long lifetime)</CODE><BR> Remote Publish an advertisement will attempt to remote publish adv on all configured transports, the Advertisement will carry a a expiration of <i> lifetime</i></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/discovery/DiscoveryServiceInterface.html#removeDiscoveryListener(net.jxta.discovery.DiscoveryListener)">removeDiscoveryListener</A></B>(<A HREF="../../../../net/jxta/discovery/DiscoveryListener.html" title="interface in net.jxta.discovery">DiscoveryListener</A> listener)</CODE><BR> remove a discovery listener</TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -