?? rendezvousservice.html
字號:
<HR><A NAME="startRendezVous()"><!-- --></A><H3>startRendezVous</H3><PRE>public void <B>startRendezVous</B>()</PRE><DL><DD>Start the local peer as a RendezVous peer with the default manager.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="stopRendezVous()"><!-- --></A><H3>stopRendezVous</H3><PRE>public void <B>stopRendezVous</B>()</PRE><DL><DD>Stop the RendezVous function on the local Peer. All connected Peer are disconnected.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getConnectedPeers()"><!-- --></A><H3>getConnectedPeers</H3><PRE>public java.util.Enumeration <B>getConnectedPeers</B>()</PRE><DL><DD>Returns an Enumeration of PeerID of the peers that are currentely connected.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Enumeration enumeration of peers connected to that rendezvous</DL></DD></DL><HR><A NAME="getConnectedPeerIDs()"><!-- --></A><H3>getConnectedPeerIDs</H3><PRE>public java.util.Vector <B>getConnectedPeerIDs</B>()</PRE><DL><DD>Returns a Vector of PeerID of the peers that are currentely connected.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Vector vector of peers connected to that rendezvous</DL></DD></DL><HR><A NAME="sendRendezVousAdv(net.jxta.protocol.PeerAdvertisement, net.jxta.protocol.PeerAdvertisement)"><!-- --></A><H3>sendRendezVousAdv</H3><PRE>public void <B>sendRendezVousAdv</B>(<A HREF="../../../net/jxta/protocol/PeerAdvertisement.html" title="class in net.jxta.protocol">PeerAdvertisement</A> destPeer, <A HREF="../../../net/jxta/protocol/PeerAdvertisement.html" title="class in net.jxta.protocol">PeerAdvertisement</A> rendezVous)</PRE><DL><DD><B>Deprecated.</B> <I>Should never have been public</I><P><DD>Sends advertisement about other RendezVous to a given peer<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>destPeer</CODE> - is the advertisement of the peer to which to send the RendezVous advertisement.<DD><CODE>rendezVous</CODE> - is the advertisment of a RendezVous peer</DL></DD></DL><HR><A NAME="addPropagateListener(java.lang.String, net.jxta.endpoint.EndpointListener)"><!-- --></A><H3>addPropagateListener</H3><PRE>public boolean <B>addPropagateListener</B>(java.lang.String name, <A HREF="../../../net/jxta/endpoint/EndpointListener.html" title="interface in net.jxta.endpoint">EndpointListener</A> listener) throws java.io.IOException</PRE><DL><DD>Clients of the rendezvous service can use this to receive raw propagation rather than crawling query/responses. It takes care of TTL counting and loop detection.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the listener.<DD><CODE>listener</CODE> - An EndpointListener to process the message.<DT><B>Returns:</B><DD>true if listener was registered, otherwise false.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="removePropagateListener(java.lang.String, net.jxta.endpoint.EndpointListener)"><!-- --></A><H3>removePropagateListener</H3><PRE>public <A HREF="../../../net/jxta/endpoint/EndpointListener.html" title="interface in net.jxta.endpoint">EndpointListener</A> <B>removePropagateListener</B>(java.lang.String name, <A HREF="../../../net/jxta/endpoint/EndpointListener.html" title="interface in net.jxta.endpoint">EndpointListener</A> listener)</PRE><DL><DD>Removes a Listener previously added with addPropagateListener.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the listener.<DD><CODE>listener</CODE> - An EndpointListener to process the message.<DT><B>Returns:</B><DD>the listener removed, null otherwise</DL></DD></DL><HR><A NAME="addListener(net.jxta.rendezvous.RendezvousListener)"><!-- --></A><H3>addListener</H3><PRE>public void <B>addListener</B>(<A HREF="../../../net/jxta/rendezvous/RendezvousListener.html" title="interface in net.jxta.rendezvous">RendezvousListener</A> listener)</PRE><DL><DD>Add a listener for RenDezVousEvents<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - An RendezvousListener to process the event.</DL></DD></DL><HR><A NAME="removeListener(net.jxta.rendezvous.RendezvousListener)"><!-- --></A><H3>removeListener</H3><PRE>public boolean <B>removeListener</B>(<A HREF="../../../net/jxta/rendezvous/RendezvousListener.html" title="interface in net.jxta.rendezvous">RendezvousListener</A> listener)</PRE><DL><DD>Removes a Listener previously added with addListener.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the RendezvousListener listener remove</DL></DD></DL><HR><A NAME="propagate(net.jxta.endpoint.Message, java.lang.String, java.lang.String, int)"><!-- --></A><H3>propagate</H3><PRE>public void <B>propagate</B>(<A HREF="../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A> msg, java.lang.String serviceName, java.lang.String serviceParam, int defaultTTL) throws java.io.IOException</PRE><DL><DD>Propagates a message onto as many peers on the local network as possible. Typically the message will go to all the peers to which at least one endpoint transport can address without using the router. <p/>This method sends the message to all peers, rendezvous peers and edge peer. This method of propation is very expensive and should not be frequentely used. When rendezvous peers are used in order to cache index of data, it is more efficient to use the walk() method. <p/>Only a single HOP at a time is performed. Messages are always delivered to the destination handler on arrival. This handler is responsible for repropagating further, if deemed appropropriate. <p/>Loop and TTL control are performed automatically. <p/>Messages can be propagated via this method for the first time or can be re-propagated by re-using a message that came in via propagation. In the later case, the TTL and loop detection parameters CANNOT be re-initialized. If one wants to "re-propagate" a message with a new TTL and blank gateways list one must generate a completely new message. This limits the risk of accidental propagation storms, although they can always be engineered deliberately. <p/><b>Note</b>: The original msg is not modified and may be reused upon return.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>msg</CODE> - is the message to propagate.<DD><CODE>serviceName</CODE> - is the name of the service<DD><CODE>serviceParam</CODE> - is the parameter of the service<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="propagate(java.util.Enumeration, net.jxta.endpoint.Message, java.lang.String, java.lang.String, int)"><!-- --></A><H3>propagate</H3><PRE>public void <B>propagate</B>(java.util.Enumeration destPeerIds, <A HREF="../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A> msg, java.lang.String serviceName, java.lang.String serviceParam, int defaultTTL) throws java.io.IOException</PRE><DL><DD>Propagates a message onto as many peers on the local network as possible. Typically the message will go to all the peers to which at least one endpoint transport can address without using the router. <p/>This method sends the message to all peers, rendezvous peers and edge peer. This method of propation is very expensive and should not be frequentely used. When rendezvous peers are used in order to cache index of data, it is more efficient to use the walk() method. <p/>Only a single HOP at a time is performed. Messages are always delivered to the destination handler on arrival. This handler is responsible for repropagating further, if deemed appropropriate. <p/>Loop and TTL control are performed automatically. <p/>Messages can be propagated via this method for the first time or can be re-propagated by re-using a message that came in via propagation. In the later case, the TTL and loop detection parameters CANNOT be re-initialized. If one wants to "re-propagate" a message with a new TTL and blank gateways list one must generate a completely new message. This limits the risk of accidental propagation storms, although they can always be engineered deliberately. <p/><b>Note</b>: The original msg is not modified and may be reused upon return.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>destPeerIds</CODE> - is a vector of PeerID of the peers that are recipients of the propgated message.<DD><CODE>msg</CODE> - is the message to propagate.<DD><CODE>serviceName</CODE> - is the name of the service<DD><CODE>serviceParam</CODE> - is the parameter of the service<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="propagateToNeighbors(net.jxta.endpoint.Message, java.lang.String, java.lang.String, int, java.lang.String)"><!-- --></A><H3>propagateToNeighbors</H3><PRE>public void <B>propagateToNeighbors</B>(<A HREF="../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A> msg, java.lang.String serviceName, java.lang.String serviceParam, int defaultTTL, java.lang.String prunePeer) throws java.io.IOException</PRE><DL><DD><B>Deprecated.</B> <I>use <A HREF="../../../net/jxta/rendezvous/RendezVousService.html#propagate(net.jxta.endpoint.Message, java.lang.String, java.lang.String, int)"><CODE>propagate(Message,String,String,int)</CODE></A></I><P><DD>Propagates a message onto as many peers on the local network as possible. Typically the message will go to all the peers to which at least one endpoint transport can address without using the router. <p/>Only a single HOP at a time is performed. Messages are always delivered to the destination handler on arrival. This handler is responsible for repropagating further, if deemed appropropriate. <p/>Loop and TTL control are performed automatically. <p/>Messages can be propagated via this method for the first time or can be re-propagated by re-using a message that came in via propagation. In the later case, the TTL and loop detection parameters CANNOT be re-initialized. If one wants to "re-propagate" a message with a new TTL and blank gateways list one must generate a completely new message. This limits the risk of accidental propagation storms, although they can always be engineered deliberately. <p/><b>Note</b>: The original msg is not modified and may be reused upon return.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>msg</CODE> - is the message to propagate.<DD><CODE>serviceName</CODE> - is the name of the service<DD><CODE>serviceParam</CODE> - is the parameter of the service<DD><CODE>prunePeer</CODE> - is a peer to prune in the propagation.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="propagateInGroup(net.jxta.endpoint.Message, java.lang.String, java.lang.String, int, java.lang.String)"><!-- --></A><H3>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -