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

📄 endpointrouter.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<A HREF="../../../../../net/jxta/endpoint/EndpointService.html" title="interface in net.jxta.endpoint">EndpointService</A> <B>endpoint</B></PRE><DL><DD>endpointservice handle<P><DL></DL></DL><HR><A NAME="routerSName"><!-- --></A><H3>routerSName</H3><PRE>public static final java.lang.String <B>routerSName</B></PRE><DL><DD>Router Service Name<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.endpoint.router.EndpointRouter.routerSName">Constant Field Values</A></DL></DL><HR><A NAME="pendingQueries"><!-- --></A><H3>pendingQueries</H3><PRE>protected java.util.Map <B>pendingQueries</B></PRE><DL><DD>We record queries when first started and keep them pending for a while. Threads coming in the meanwhile wait for a result without initiating a query. Thus threads may wait passed the point where the query is no-longer pending, and, although they could initiate a new one, they do not. However, other threads coming later may initiate a new query. So a query is not re-initiated systematically on a fixed schedule. This mechanism also serves to avoid infinite recursions if we're looking for the route to a rendezvous (route queries will try to go there themselves). FIXME: jice@jxta.org 20020903 this is approximate. We can do cleaner/better than that, but it's an inexpensive improvement over what was there before. FIXME: tra@jxta.org 20030818 the pending hashmap should be moved in the routeResolver class as this will allow to only synchronize on the routeResolver object rather than the router object.  <p/><ul>      <li>Keys are <A HREF="../../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint"><CODE>EndpointAddress</CODE></A>.</li>      <li>Values are <CODE>#ClearPendingQuery</CODE>.</li>  </ul><P><DL></DL></DL><HR><A NAME="GET_ROUTE_CONTROL"><!-- --></A><H3>GET_ROUTE_CONTROL</H3><PRE>public static final java.lang.Integer <B>GET_ROUTE_CONTROL</B></PRE><DL><DD>MessageTransport Control operation<P><DL></DL></DL><HR><A NAME="RouteControlOp"><!-- --></A><H3>RouteControlOp</H3><PRE>public static final int <B>RouteControlOp</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.endpoint.router.EndpointRouter.RouteControlOp">Constant Field Values</A></DL></DL><HR><A NAME="ASYNC_MESSENGER_WAIT"><!-- --></A><H3>ASYNC_MESSENGER_WAIT</H3><PRE>public static final long <B>ASYNC_MESSENGER_WAIT</B></PRE><DL><DD>how long we are willing to wait for a response from an async getMessenger. We do not wait long at all because it is non-critical that we get the answer synchronously. The goal is to avoid starting a route discovery if there's a chance to get a direct connection. However, we will still take advantage of the direct route if it is found while we wait for the route discovery result. If that happens, the only wrong is that we used some bandwidth doing a route discovery that wasn't needed after all.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.endpoint.router.EndpointRouter.ASYNC_MESSENGER_WAIT">Constant Field Values</A></DL></DL><!-- ========= 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="EndpointRouter()"><!-- --></A><H3>EndpointRouter</H3><PRE>public <B>EndpointRouter</B>()</PRE><DL><DD>Default constructor<P></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="getMyLocalRoute()"><!-- --></A><H3>getMyLocalRoute</H3><PRE>protected <A HREF="../../../../../net/jxta/protocol/RouteAdvertisement.html" title="class in net.jxta.protocol">RouteAdvertisement</A> <B>getMyLocalRoute</B>()</PRE><DL><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="isLocalRoute(net.jxta.endpoint.EndpointAddress)"><!-- --></A><H3>isLocalRoute</H3><PRE>protected boolean <B>isLocalRoute</B>(<A HREF="../../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A>&nbsp;pId)</PRE><DL><DD>isLocalRoute is a shalow test. It tells you that there used to be a local route that worked the last time it was tried.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="ensureLocalRoute(net.jxta.endpoint.EndpointAddress)"><!-- --></A><H3>ensureLocalRoute</H3><PRE>protected boolean <B>ensureLocalRoute</B>(<A HREF="../../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A>&nbsp;pId)</PRE><DL><DD>Ensure there is a local route for a given peer id if it can at all be done.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pId</CODE> - the peer who's route is desired.<DT><B>Returns:</B><DD>boolean true if there was a local route or one could be added.</DL></DD></DL><HR><A NAME="ensureLocalRoute(net.jxta.endpoint.EndpointAddress, java.lang.Object)"><!-- --></A><H3>ensureLocalRoute</H3><PRE>protected boolean <B>ensureLocalRoute</B>(<A HREF="../../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A>&nbsp;pId,                                   java.lang.Object&nbsp;hint)</PRE><DL><DD>Ensure there is a local route for a given peer id if it can at all be done.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pId</CODE> - the peer who's route is desired.<DD><CODE>hint</CODE> - specify a specific route hint to use<DT><B>Returns:</B><DD>boolean true if there was a local route or one could be added.</DL></DD></DL><HR><A NAME="sendOnLocalRoute(net.jxta.endpoint.EndpointAddress, net.jxta.endpoint.Message)"><!-- --></A><H3>sendOnLocalRoute</H3><PRE>void <B>sendOnLocalRoute</B>(<A HREF="../../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A>&nbsp;destination,                      <A HREF="../../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A>&nbsp;message)                throws java.io.IOException</PRE><DL><DD>Send a message to a given logical destination if it maps to some  messenger in our messenger pool or if such a mapping can be found and  added.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>destination</CODE> - peer-based address to send the message to.<DD><CODE>message</CODE> - the message to be sent.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="init(net.jxta.peergroup.PeerGroup, net.jxta.id.ID, net.jxta.document.Advertisement)"><!-- --></A><H3>init</H3><PRE>public void <B>init</B>(<A HREF="../../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A>&nbsp;g,                 <A HREF="../../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A>&nbsp;assignedID,                 <A HREF="../../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A>&nbsp;impl)          throws <A HREF="../../../../../net/jxta/exception/PeerGroupException.html" title="class in net.jxta.exception">PeerGroupException</A></PRE><DL><DD>Initialize the module, passing it its peer group and advertisement.  <p/>Note: when subclassing one of the existing PeerGroup implementations (which implement Module), it may not be recommended to overload the init method. See the documentation of the PeerGroup class being subclassed.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../net/jxta/platform/Module.html#init(net.jxta.peergroup.PeerGroup, net.jxta.id.ID, net.jxta.document.Advertisement)">init</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>g</CODE> - The PeerGroup from which this Module can obtain services.  If this module is a service, this is also the PeerGroup of which this  module is a service.<DD><CODE>assignedID</CODE> - Identity of Module within group.  modules can use it as a the root of their namespace to create  names that are unique within the group but predictible by the  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

⌨️ 快捷键说明

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