📄 routeadvertisement.html
字号:
and is relatively unique between advertisements instances. For example, the Peer Advertisement returns the Peer ID.</li> <li>A static CodatID which is generated via some canonical process which will produce the same value each time and different values for different advertisements of the same type.</li> <li>ID.nullID for advertisement types which are not readily indexed. </li> </ul> <p/>Since this ID is normally used for indexing, the IDs returned must be as unique as possible to avoid collisions. <p/>For Advertisement types which normally return non-ID.nullID values no ID should be returned when asked to generate an ID while the Advertisement is an inconsistent state (example: unitialized index fields). Instead <code>java.lang.IllegalStateException</code> should be thrown.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../net/jxta/protocol/AccessPointAdvertisement.html" title="class in net.jxta.protocol">AccessPointAdvertisement</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/protocol/RouteAdvertisement.html#getLastHop()">getLastHop</A></B>()</CODE><BR> Returns the access point for the last hop</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Vector</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/protocol/RouteAdvertisement.html#getVectorHops()">getVectorHops</A></B>()</CODE><BR> returns the list of hops</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/protocol/RouteAdvertisement.html#hasALoop()">hasALoop</A></B>()</CODE><BR> check if the route has a loop</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/protocol/RouteAdvertisement.html" title="class in net.jxta.protocol">RouteAdvertisement</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/protocol/RouteAdvertisement.html#newRoute(net.jxta.peer.PeerID, net.jxta.peer.PeerID, java.util.Vector)">newRoute</A></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)</CODE><BR> construct a new route <p/><b>WARNING hops may be MODIFIED.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../net/jxta/protocol/RouteAdvertisement.html" title="class in net.jxta.protocol">RouteAdvertisement</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/protocol/RouteAdvertisement.html#newRoute(net.jxta.peer.PeerID, java.util.Vector)">newRoute</A></B>(<A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> destPid, java.util.Vector hops)</CODE><BR> construct a new route, all hops are in the hops parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../net/jxta/protocol/AccessPointAdvertisement.html" title="class in net.jxta.protocol">AccessPointAdvertisement</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/protocol/RouteAdvertisement.html#nextHop(net.jxta.peer.PeerID)">nextHop</A></B>(<A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> pid)</CODE><BR> get the nexthop after the given hop</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/protocol/RouteAdvertisement.html#removeDestEndpointAddresses(java.util.Vector)">removeDestEndpointAddresses</A></B>(java.util.Vector addresses)</CODE><BR> remove a list of EndpointAddresses from the Route Destination access point</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/protocol/RouteAdvertisement.html#removeEndpointAddressToHop(net.jxta.peer.PeerID, net.jxta.endpoint.EndpointAddress)">removeEndpointAddressToHop</A></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)</CODE><BR> remove an endpointaddress to a hop</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/protocol/RouteAdvertisement.html#removeHop(net.jxta.peer.PeerID)">removeHop</A></B>(<A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> pid)</CODE><BR> remove a hop from the list of hops</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/protocol/RouteAdvertisement.html#replaceHop(net.jxta.protocol.AccessPointAdvertisement)">replaceHop</A></B>(<A HREF="../../../net/jxta/protocol/AccessPointAdvertisement.html" title="class in net.jxta.protocol">AccessPointAdvertisement</A> ap)</CODE><BR> replace a hop from the list of hops</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/protocol/RouteAdvertisement.html#setDest(net.jxta.protocol.AccessPointAdvertisement)">setDest</A></B>(<A HREF="../../../net/jxta/protocol/AccessPointAdvertisement.html" title="class in net.jxta.protocol">AccessPointAdvertisement</A> ap)</CODE><BR> Sets the access point of the destination</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/protocol/RouteAdvertisement.html#setDestEndpointAddresses(java.util.Vector)">setDestEndpointAddresses</A></B>(java.util.Vector ea)</CODE><BR> Set the route destination endpoint addresses</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/protocol/RouteAdvertisement.html#setDestPeerID(net.jxta.peer.PeerID)">setDestPeerID</A></B>(<A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> pid)</CODE><BR> Sets the route destination peer id</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/protocol/RouteAdvertisement.html#setFirstHop(net.jxta.protocol.AccessPointAdvertisement)">setFirstHop</A></B>(<A HREF="../../../net/jxta/protocol/AccessPointAdvertisement.html" title="class in net.jxta.protocol">AccessPointAdvertisement</A> ap)</CODE><BR> Sets the access point for the first hop</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/protocol/RouteAdvertisement.html#setHops(java.util.Vector)">setHops</A></B>(java.util.Vector hopsAccess)</CODE><BR> sets the list of hops associated with this route</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/protocol/RouteAdvertisement.html#setLastHop(net.jxta.protocol.AccessPointAdvertisement)">setLastHop</A></B>(<A HREF="../../../net/jxta/protocol/AccessPointAdvertisement.html" title="class in net.jxta.protocol">AccessPointAdvertisement</A> ap)</CODE><BR> Sets the access point for the last hop</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/protocol/RouteAdvertisement.html#size()">size</A></B>()</CODE><BR> return the length of the route</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/protocol/RouteAdvertisement.html#stichRoute(net.jxta.protocol.RouteAdvertisement, net.jxta.protocol.RouteAdvertisement)">stichRoute</A></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)</CODE><BR> Alter the given newRoute (which does not start from here) by using firstLeg, a known route to whence it starts from. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/protocol/RouteAdvertisement.html#stichRoute(net.jxta.protocol.RouteAdvertisement, net.jxta.protocol.RouteAdvertisement, net.jxta.peer.PeerID)">stichRoute</A></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)</CODE><BR> Alter the given newRoute (which does not start from here) by using firstLeg, a known route to whence it starts from. </TD></TR></TABLE> <A NAME="methods_inherited_from_class_net.jxta.document.ExtendableAdvertisement"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class net.jxta.document.<A HREF="../../../net/jxta/document/ExtendableAdvertisement.html" title="class in net.jxta.document">ExtendableAdvertisement</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../net/jxta/document/ExtendableAdvertisement.html#getDocument(net.jxta.document.MimeMediaType)">getDocument</A>, <A HREF="../../../net/jxta/document/ExtendableAdvertisement.html#handleElement(net.jxta.document.Element)">handleElement</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_net.jxta.document.Advertisement"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class net.jxta.document.<A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../net/jxta/document/Advertisement.html#getAdvType()">getAdvType</A>, <A HREF="../../../net/jxta/document/Advertisement.html#getIndexFields()">getIndexFields</A>, <A HREF="../../../net/jxta/document/Advertisement.html#toString()">toString</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="RouteAdvertisement()"><!-- --></A><H3>RouteAdvertisement</H3><PRE>public <B>RouteAdvertisement</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public java.lang.Object <B>clone</B>()</PRE><DL><DD><P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../net/jxta/document/Advertisement.html#clone()">clone</A></CODE> in class <CODE><A HREF="../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="cloneOnlyPIDs()"><!-- --></A><H3>cloneOnlyPIDs</H3><PRE>public java.lang.Object <B>cloneOnlyPIDs</B>()</PRE><DL><DD>makes a copy of a route advertisement that only contains PID not endpoint addresses<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>object clone route advertisement</DL></DD></DL><HR><A NAME="getAdvertisementType()"><!-- --></A><H3>getAdvertisementType</H3><PRE>public static final java.lang.String <B>getAdvertisementType</B>()</PRE><DL><DD>{@inheritDoc}<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getBaseAdvType()"><!-- --></A><H3>getBaseAdvType</H3><PRE>public final java.lang.String <B>getBaseAdvType</B>()</PRE><DL><DD>Returns the base type of this advertisement hierarchy. Typically, only the most basic advertisement of a type will implement this method and declare it as <code>final</code>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../net/jxta/document/ExtendableAdvertisement.html#getBaseAdvType()">getBaseAdvType</A></CODE> in class <CODE><A HREF="../../../net/jxta/document/ExtendableAdvertisement.html" title="class in net.jxta.document">ExtendableAdvertisement</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>String the base type of advertisements in this hierarchy.</DL></DD></DL><HR><A NAME="getID()"><!-- --></A><H3>getID</H3><PRE>public <A HREF="../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A> <B>getID</B>()</PRE><DL><DD>Returns a unique ID suitable for indexing of this Advertisement. <p/>The ID is supposed to be unique and is not guaranteed to be of any particular subclass of ID. Each class of advertisement is responsible for the choice of ID to return. The value for the ID returned can either be: <p><ul> <li>An ID which is already part of the advertisement definition
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -