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

📄 rendezvousserviceimpl.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 5 页
字号:
  same module on another peer. This is normaly the ModuleClassID  which is also the name under which the module is known by other  modules. For a group it is the PeerGroupID itself.  The parameters of a service, in the Peer configuration, are indexed  by the assignedID of that service, and a Service must publish its  run-time parameters in the Peer Advertisement under its assigned ID.<DD><CODE>impl</CODE> - The implementation advertisement for this  Module. It is permissible to pass null if no implementation  advertisement is available. This may happen if the  implementation was selected by explicit class name rather than  by following an implementation advertisement. Modules are not  required to support that style of loading, but if they do, then  their documentation should mention it.</DL></DD></DL><HR><A NAME="startApp(java.lang.String[])"><!-- --></A><H3>startApp</H3><PRE>public int <B>startApp</B>(java.lang.String[]&nbsp;arg)</PRE><DL><DD>Some Modules will wait for this method being invoked, before completing their initializatino to the point that they are fully functional. That is also the opportunity to supply arbitrary arguments (mostly to applications).  <p/>If this module is a <A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup"><CODE>PeerGroup</CODE></A> service, it may be invoked several times depending on its return value.  <p/>Note: the name of this method is historical and no-longer adequate.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/platform/Module.html#startApp(java.lang.String[])">startApp</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>arg</CODE> - An array of Strings forming the parameters for this Module.<DT><B>Returns:</B><DD>int A status indication which may be one of  <A HREF="../../../../net/jxta/platform/Module.html#START_OK"><CODE>Module.START_OK</CODE></A>, <A HREF="../../../../net/jxta/platform/Module.html#START_AGAIN_PROGRESS"><CODE>Module.START_AGAIN_PROGRESS</CODE></A>, <A HREF="../../../../net/jxta/platform/Module.html#START_AGAIN_STALLED"><CODE>Module.START_AGAIN_STALLED</CODE></A>, which indicates partial or complete success, or any other value (negative values are recommended for future compatibility), which indicates failure.</DL></DD></DL><HR><A NAME="stopApp()"><!-- --></A><H3>stopApp</H3><PRE>public void <B>stopApp</B>()</PRE><DL><DD>One can ask a Module to stop.  The Module cannot be forced to comply, but in the future  we might be able to deny it access to anything after some timeout.  <p/>Note: the name of this method is no-longer adequate.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/platform/Module.html#stopApp()">stopApp</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="isRendezVous()"><!-- --></A><H3>isRendezVous</H3><PRE>public boolean <B>isRendezVous</B>()</PRE><DL><DD>tells whether this rendezvous service currently acts as a "super-node" "rendezvous", knowlege hub, influence broker, or whichever higher status applies to the implementation.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html#isRendezVous()">isRendezVous</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html" title="interface in net.jxta.rendezvous">RendezVousService</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>boolean true if this rendezvous acts as a "rendezvous" per the implementation definition.</DL></DD></DL><HR><A NAME="setAutoStart(boolean)"><!-- --></A><H3>setAutoStart</H3><PRE>public boolean <B>setAutoStart</B>(boolean&nbsp;auto)</PRE><DL><DD>(@inheritDoc}<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html#setAutoStart(boolean)">setAutoStart</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html" title="interface in net.jxta.rendezvous">RendezVousService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>auto</CODE> - true will activate automatic switching<DT><B>Returns:</B><DD>the previous value of this mode</DL></DD></DL><HR><A NAME="setAutoStart(boolean, long)"><!-- --></A><H3>setAutoStart</H3><PRE>public boolean <B>setAutoStart</B>(boolean&nbsp;auto,                            long&nbsp;period)</PRE><DL><DD>(@inheritDoc}<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html#setAutoStart(boolean, long)">setAutoStart</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html" title="interface in net.jxta.rendezvous">RendezVousService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>auto</CODE> - true will activate automatic switching<DD><CODE>period</CODE> - the period of auto-checking<DT><B>Returns:</B><DD>the previous value of this mode</DL></DD></DL><HR><A NAME="setMonitor(net.jxta.rendezvous.RendezVousMonitor)"><!-- --></A><H3>setMonitor</H3><PRE>public final <A HREF="../../../../net/jxta/rendezvous/RendezVousMonitor.html" title="interface in net.jxta.rendezvous">RendezVousMonitor</A> <B>setMonitor</B>(<A HREF="../../../../net/jxta/rendezvous/RendezVousMonitor.html" title="interface in net.jxta.rendezvous">RendezVousMonitor</A>&nbsp;handler)</PRE><DL><DD>Register a notification handler that is called each time a RendezVousService peer is not reachable anymore.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html#setMonitor(net.jxta.rendezvous.RendezVousMonitor)">setMonitor</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html" title="interface in net.jxta.rendezvous">RendezVousService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>handler</CODE> - a handler that is called each time a RendezVousService peer is is not reachable anymore.<DT><B>Returns:</B><DD>RendezVousMonitor returns, if any, the current RendezVousMonitor</DL></DD></DL><HR><A NAME="connectToRendezVous(net.jxta.protocol.PeerAdvertisement)"><!-- --></A><H3>connectToRendezVous</H3><PRE>public void <B>connectToRendezVous</B>(<A HREF="../../../../net/jxta/protocol/PeerAdvertisement.html" title="class in net.jxta.protocol">PeerAdvertisement</A>&nbsp;adv)                         throws java.io.IOException</PRE><DL><DD>Add a peer as a new RendezVousService point. <p/>If/When the RendezVousService accepts the connection, the RendezVous service will invoke the RendezVousMonitor.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html#connectToRendezVous(net.jxta.protocol.PeerAdvertisement)">connectToRendezVous</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html" title="interface in net.jxta.rendezvous">RendezVousService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>adv</CODE> - the advertisement of the RendezVousService peer<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - when the RendezVousService peer is not reachable</DL></DD></DL><HR><A NAME="connectToRendezVous(net.jxta.endpoint.EndpointAddress)"><!-- --></A><H3>connectToRendezVous</H3><PRE>public void <B>connectToRendezVous</B>(<A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A>&nbsp;addr)                         throws java.io.IOException</PRE><DL><DD>Add a peer as a new RendezVousService point. <p/>If/When the RendezVousService accepts the connection, the RendezVous service will invoke the RendezVousMonitor.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html#connectToRendezVous(net.jxta.endpoint.EndpointAddress)">connectToRendezVous</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html" title="interface in net.jxta.rendezvous">RendezVousService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>addr</CODE> - EndpointAddress of the rendezvous peer<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - when the RendezVousService peer is not reachable</DL></DD></DL><HR><A NAME="reconnectToRendezVous(net.jxta.id.ID)"><!-- --></A><H3>reconnectToRendezVous</H3><PRE>public void <B>reconnectToRendezVous</B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A>&nbsp;peer)</PRE><DL><DD>{@inheritDoc}<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="challengeRendezVous(net.jxta.id.ID, long)"><!-- --></A><H3>challengeRendezVous</H3><PRE>public void <B>challengeRendezVous</B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A>&nbsp;peer,                                long&nbsp;delay)</PRE><DL><DD>Set a new deadline for the rendezvous to be proven alive. As a result a lease reponse must be sought and obtained within the specified delay or the rdv is considered disconnected. So, if a lease scheme is used, this can be implemented simply by setting the new lease deadLine accordingly. <p/>A timeout of 0 or less triggers immediate disconnection.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html#challengeRendezVous(net.jxta.id.ID, long)">challengeRendezVous</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html" title="interface in net.jxta.rendezvous">RendezVousService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>peer</CODE> - The peer to be challenged<DD><CODE>delay</CODE> - The delay</DL></DD></DL><HR><A NAME="disconnectFromRendezVous(net.jxta.id.ID)"><!-- --></A><H3>disconnectFromRendezVous</H3><PRE>public void <B>disconnectFromRendezVous</B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A>&nbsp;peerId)</PRE><DL><DD>Remove a RendezVousService point.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html#disconnectFromRendezVous(net.jxta.id.ID)">disconnectFromRendezVous</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html" title="interface in net.jxta.rendezvous">RendezVousService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>peerId</CODE> - the PeerId of the RendezVous to disconnect from.</DL></DD></DL><HR><A NAME="getConnectedRendezVous()"><!-- --></A><H3>getConnectedRendezVous</H3><PRE>public java.util.Enumeration <B>getConnectedRendezVous</B>()</PRE><DL><DD>Returns an Enumeration of the PeerID all the RendezVous on which this Peer is currentely connected.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html#getConnectedRendezVous()">getConnectedRendezVous</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/rendezvous/RendezVousService.html" title="interface in net.jxta.rendezvous">RendezVousService</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Enumeration enumeration of RendezVous</DL></DD></DL><HR><A NAME="getDisconnectedRendezVous()"><!-- --></A><H3>getDisconnectedRendezVous</H3><PRE>public java.util.Enumeration <B>getDisconnectedRendezVous</B>()</PRE><DL><DD>Returns an Enumeration of the PeerID all the RendezVous on which this Peer faile

⌨️ 快捷键说明

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