📄 routeadvertisement.html
字号:
size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>return the length of the route<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>int size of the route</DL></DD></DL><HR><A NAME="nextHop(net.jxta.peer.PeerID)"><!-- --></A><H3>nextHop</H3><PRE>public <A HREF="../../../net/jxta/protocol/AccessPointAdvertisement.html" title="class in net.jxta.protocol">AccessPointAdvertisement</A> <B>nextHop</B>(<A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> pid)</PRE><DL><DD>get the nexthop after the given hop<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pid</CODE> - PeerID of the current hop<DT><B>Returns:</B><DD>ap AccessPointAdvertisement of the next Hop</DL></DD></DL><HR><A NAME="display()"><!-- --></A><H3>display</H3><PRE>public java.lang.String <B>display</B>()</PRE><DL><DD>Generate a string that displays the route information for logging or debugging purpose<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>String return a string containing the route info</DL></DD></DL><HR><A NAME="removeHop(net.jxta.peer.PeerID)"><!-- --></A><H3>removeHop</H3><PRE>public boolean <B>removeHop</B>(<A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> pid)</PRE><DL><DD>remove a hop from the list of hops<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pid</CODE> - peer id of the hop<DT><B>Returns:</B><DD>boolean true or false if the hop is found in the route</DL></DD></DL><HR><A NAME="getHop(net.jxta.peer.PeerID)"><!-- --></A><H3>getHop</H3><PRE>public <A HREF="../../../net/jxta/protocol/AccessPointAdvertisement.html" title="class in net.jxta.protocol">AccessPointAdvertisement</A> <B>getHop</B>(<A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> pid)</PRE><DL><DD>return a hop from the list of hops<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pid</CODE> - peer id of the hop<DT><B>Returns:</B><DD>accesspointadvertisement of the corresponding hop</DL></DD></DL><HR><A NAME="replaceHop(net.jxta.protocol.AccessPointAdvertisement)"><!-- --></A><H3>replaceHop</H3><PRE>public void <B>replaceHop</B>(<A HREF="../../../net/jxta/protocol/AccessPointAdvertisement.html" title="class in net.jxta.protocol">AccessPointAdvertisement</A> ap)</PRE><DL><DD>replace a hop from the list of hops<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ap</CODE> - accesspointadvertisement of the hop to replace</DL></DD></DL><HR><A NAME="addEndpointAddressToHop(net.jxta.peer.PeerID, net.jxta.endpoint.EndpointAddress)"><!-- --></A><H3>addEndpointAddressToHop</H3><PRE>public void <B>addEndpointAddressToHop</B>(<A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> pid, <A HREF="../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> addr)</PRE><DL><DD>Add a new endpointaddress to a hop<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pid</CODE> - id of the hop<DD><CODE>addr</CODE> - new endpoint address to add</DL></DD></DL><HR><A NAME="removeEndpointAddressToHop(net.jxta.peer.PeerID, net.jxta.endpoint.EndpointAddress)"><!-- --></A><H3>removeEndpointAddressToHop</H3><PRE>public void <B>removeEndpointAddressToHop</B>(<A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> pid, <A HREF="../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> addr)</PRE><DL><DD>remove an endpointaddress to a hop<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pid</CODE> - id of the hop<DD><CODE>addr</CODE> - new endpoint address to remove</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(java.lang.Object target)</PRE><DL><DD>compare if two routes are equals. Equals means the same number of hops and the same endpoint addresses for each hop and the destination<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>boolean true if the route is equal to this route otherwise false</DL></DD></DL><HR><A NAME="getHop(int)"><!-- --></A><H3>getHop</H3><PRE>public <A HREF="../../../net/jxta/protocol/AccessPointAdvertisement.html" title="class in net.jxta.protocol">AccessPointAdvertisement</A> <B>getHop</B>(int index)</PRE><DL><DD>Return hop of the route at location index in the hops list<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - in the list of hops<DT><B>Returns:</B><DD>hop AccessPointAdvertisement of the hops</DL></DD></DL><HR><A NAME="newRoute(net.jxta.peer.PeerID, net.jxta.peer.PeerID, java.util.Vector)"><!-- --></A><H3>newRoute</H3><PRE>public static <A HREF="../../../net/jxta/protocol/RouteAdvertisement.html" title="class in net.jxta.protocol">RouteAdvertisement</A> <B>newRoute</B>(<A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> destPid, <A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> firsthop, java.util.Vector hops)</PRE><DL><DD>construct a new route <p/><b>WARNING hops may be MODIFIED.</b><P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="newRoute(net.jxta.peer.PeerID, java.util.Vector)"><!-- --></A><H3>newRoute</H3><PRE>public static <A HREF="../../../net/jxta/protocol/RouteAdvertisement.html" title="class in net.jxta.protocol">RouteAdvertisement</A> <B>newRoute</B>(<A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> destPid, java.util.Vector hops)</PRE><DL><DD>construct a new route, all hops are in the hops parameter.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="stichRoute(net.jxta.protocol.RouteAdvertisement, net.jxta.protocol.RouteAdvertisement)"><!-- --></A><H3>stichRoute</H3><PRE>public static boolean <B>stichRoute</B>(<A HREF="../../../net/jxta/protocol/RouteAdvertisement.html" title="class in net.jxta.protocol">RouteAdvertisement</A> newRoute, <A HREF="../../../net/jxta/protocol/RouteAdvertisement.html" title="class in net.jxta.protocol">RouteAdvertisement</A> firstLeg)</PRE><DL><DD>Alter the given newRoute (which does not start from here) by using firstLeg, a known route to whence it starts from. So that the complete route goes from here to the end-destination via firstLeg. public static boolean stichRoute(RouteAdvertisement newRoute,<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="stichRoute(net.jxta.protocol.RouteAdvertisement, net.jxta.protocol.RouteAdvertisement, net.jxta.peer.PeerID)"><!-- --></A><H3>stichRoute</H3><PRE>public static boolean <B>stichRoute</B>(<A HREF="../../../net/jxta/protocol/RouteAdvertisement.html" title="class in net.jxta.protocol">RouteAdvertisement</A> newRoute, <A HREF="../../../net/jxta/protocol/RouteAdvertisement.html" title="class in net.jxta.protocol">RouteAdvertisement</A> firstLeg, <A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> localPeer)</PRE><DL><DD>Alter the given newRoute (which does not start from here) by using firstLeg, a known route to whence it starts from. So that the complete route goes from here to the end-destination via firstLeg also shortcut the route by removing the local peer<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="cleanupLoop(net.jxta.protocol.RouteAdvertisement, net.jxta.peer.PeerID)"><!-- --></A><H3>cleanupLoop</H3><PRE>public static void <B>cleanupLoop</B>(<A HREF="../../../net/jxta/protocol/RouteAdvertisement.html" title="class in net.jxta.protocol">RouteAdvertisement</A> route, <A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> localPeer)</PRE><DL><DD>Remove loops from the route advertisement by shortcuting cycle from the route<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/RouteAdvertisement.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>JXTA J2SE</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../net/jxta/protocol/ResolverSrdiMsg.html" title="class in net.jxta.protocol"><B>PREV CLASS</B></A> <A HREF="../../../net/jxta/protocol/RouteQueryMsg.html" title="class in net.jxta.protocol"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="RouteAdvertisement.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -