📄 discoveryservice.html
字号:
<CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/discovery/DiscoveryService.html#getAdvLifeTime(net.jxta.document.Advertisement)">getAdvLifeTime</A></B>(<A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> adv)</CODE><BR> Returns the maximum duration in milliseconds for which this document should be kept in local cache</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/discovery/DiscoveryService.html#getAdvLifeTime(net.jxta.id.ID, int)">getAdvLifeTime</A></B>(<A HREF="../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A> id, int type)</CODE><BR> Returns the maximum duration in milliseconds for which this document should be kept in local cache</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/discovery/DiscoveryService.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/discovery/DiscoveryService.html#getRemoteAdvertisements(java.lang.String, int, java.lang.String, java.lang.String, int)">getRemoteAdvertisements</A></B>(java.lang.String peerid, 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. </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/discovery/DiscoveryService.html#getRemoteAdvertisements(java.lang.String, int, java.lang.String, java.lang.String, int, net.jxta.discovery.DiscoveryListener)">getRemoteAdvertisements</A></B>(java.lang.String peerid, 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. </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/discovery/DiscoveryService.html#publish(net.jxta.document.Advertisement)">publish</A></B>(<A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> advertisement)</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/discovery/DiscoveryService.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> advertisement, int type)</CODE><BR> <B>Deprecated.</B> <I>Advertisement type is no longer required to publish an advertisement</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/discovery/DiscoveryService.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> <B>Deprecated.</B> <I>Advertisement type is no longer required to publish an advertisement</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/discovery/DiscoveryService.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. </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/discovery/DiscoveryService.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/discovery/DiscoveryService.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> <B>Deprecated.</B> <I>Advertisement type is no longer required to remote publish an advertisement</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/discovery/DiscoveryService.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> <B>Deprecated.</B> <I>Advertisement type is no longer required to remote publish an advertisement</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/discovery/DiscoveryService.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/discovery/DiscoveryService.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/discovery/DiscoveryService.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> <B>Deprecated.</B> <I>Advertisement type is no longer required to remote publish an advertisement</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/discovery/DiscoveryService.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> <B>Deprecated.</B> <I>Advertisement type is no longer required to remote publish an advertisement</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/discovery/DiscoveryService.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/discovery/DiscoveryService.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></TR></TABLE> <A NAME="methods_inherited_from_class_net.jxta.service.Service"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface net.jxta.service.<A HREF="../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../net/jxta/service/Service.html#getImplAdvertisement()">getImplAdvertisement</A>, <A HREF="../../../net/jxta/service/Service.html#getInterface()">getInterface</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_net.jxta.platform.Module"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface net.jxta.platform.<A HREF="../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../net/jxta/platform/Module.html#init(net.jxta.peergroup.PeerGroup, net.jxta.id.ID, net.jxta.document.Advertisement)">init</A>, <A HREF="../../../net/jxta/platform/Module.html#startApp(java.lang.String[])">startApp</A>, <A HREF="../../../net/jxta/platform/Module.html#stopApp()">stopApp</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="PEER"><!-- --></A><H3>PEER</H3><PRE>public static final int <B>PEER</B></PRE><DL><DD>DiscoveryService type Peer<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#net.jxta.discovery.DiscoveryService.PEER">Constant Field Values</A></DL></DL><HR><A NAME="GROUP"><!-- --></A><H3>GROUP</H3><PRE>public static final int <B>GROUP</B></PRE><DL><DD>DiscoveryService type Group<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#net.jxta.discovery.DiscoveryService.GROUP">Constant Field Values</A></DL></DL><HR><A NAME="ADV"><!-- --></A><H3>ADV</H3><PRE>public static final int <B>ADV</B></PRE><DL><DD>DiscoveryService type Advertisement<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#net.jxta.discovery.DiscoveryService.ADV">Constant Field Values</A></DL></DL><HR><A NAME="DEFAULT_LIFETIME"><!-- --></A><H3>DEFAULT_LIFETIME</H3><PRE>public static final long <B>DEFAULT_LIFETIME</B></PRE><DL><DD>Default lifetime time for advertisements. This is the maxiumum amount of time which the advertisement will remain valid. If the advertisement remains valid after this time, then the creator will need to republish the advertisement.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#net.jxta.discovery.DiscoveryService.DEFAULT_LIFETIME">Constant Field Values</A></DL></DL><HR><A NAME="DEFAULT_EXPIRATION"><!-- --></A><H3>DEFAULT_EXPIRATION</H3><PRE>public static final long <B>DEFAULT_EXPIRATION</B></PRE><DL><DD>Default expiration time for advertisements. This is the amount of time which advertisements will live in caches. After this time, the advertisement should be refreshed from the source.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#net.jxta.discovery.DiscoveryService.DEFAULT_EXPIRATION">Constant Field Values</A></DL></DL><HR><A NAME="INFINITE_LIFETIME"><!-- --></A><H3>INFINITE_LIFETIME</H3><PRE>public static final long <B>INFINITE_LIFETIME</B></PRE><DL><DD>Infintite lifetime for advertisements. The advertisement is valid forever. (well maybe it will expire when the sun burns out, but not before then).<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#net.jxta.discovery.DiscoveryService.INFINITE_LIFETIME">Constant Field Values</A></DL></DL><HR><A NAME="NO_EXPIRATION"><!-- --></A><H3>NO_EXPIRATION</H3><PRE>public static final long <B>NO_EXPIRATION</B></PRE><DL><DD>Specifies that the advertisment will have no expiration and will be kept indefinitly.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#net.jxta.discovery.DiscoveryService.NO_EXPIRATION">Constant Field Values</A></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -