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

📄 endpointserviceinterface.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<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>pg</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>id</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>ia</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. This is here for temporary class hierarchy reasons. it is ALWAYS ignored. By definition, the interface object protects the real object's start/stop methods from being called<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/>This is here for temporary class hierarchy reasons. it is ALWAYS ignored. By definition, the interface object protects the real object's start/stop methods from being called <p/>This request is currently ignored.<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="getImplAdvertisement()"><!-- --></A><H3>getImplAdvertisement</H3><PRE>public <A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> <B>getImplAdvertisement</B>()</PRE><DL><DD>Returns the advertisment for this service.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/service/Service.html#getImplAdvertisement()">getImplAdvertisement</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Advertisement the advertisement.</DL></DD></DL><HR><A NAME="getInterface()"><!-- --></A><H3>getInterface</H3><PRE>public <A HREF="../../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A> <B>getInterface</B>()</PRE><DL><DD>Service objects are not manipulated directly to protect usage of the service. A Service interface is returned to access the service methods. Sort of absurd but this is part of the API we're implementing. We would do a two-level API just for that.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/service/Service.html#getInterface()">getInterface</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Service public interface of the service</DL></DD></DL><HR><A NAME="getGroup()"><!-- --></A><H3>getGroup</H3><PRE>public <A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> <B>getGroup</B>()</PRE><DL><DD>Returns the group to which this EndpointService is attached.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/endpoint/EndpointService.html#getGroup()">getGroup</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/endpoint/EndpointService.html" title="interface in net.jxta.endpoint">EndpointService</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>PeerGroup the group.</DL></DD></DL><HR><A NAME="newMessage()"><!-- --></A><H3>newMessage</H3><PRE>public <A HREF="../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A> <B>newMessage</B>()</PRE><DL><DD>Returns a new Message object suitable for use with this endpoint  service.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/endpoint/EndpointService.html#newMessage()">newMessage</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/endpoint/EndpointService.html" title="interface in net.jxta.endpoint">EndpointService</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Message the new message.</DL></DD></DL><HR><A NAME="newEndpointAddress(java.lang.String)"><!-- --></A><H3>newEndpointAddress</H3><PRE>public <A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> <B>newEndpointAddress</B>(java.lang.String&nbsp;Uri)</PRE><DL><DD>Builds an EndpointAddress out the the given URI string. The resulting EndpointAddress uniquely identifies a message listener at a given network address.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/endpoint/EndpointService.html#newEndpointAddress(java.lang.String)">newEndpointAddress</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/endpoint/EndpointService.html" title="interface in net.jxta.endpoint">EndpointService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>Uri</CODE> - the uri. The structure of the URI is as follows: protocol://address/[serviceName][/serviceParam]<DT><B>Returns:</B><DD>EndpointAddress the EndpointAddress object corresponding to the given URI.</DL></DD></DL><HR><A NAME="getMessenger(net.jxta.endpoint.EndpointAddress)"><!-- --></A><H3>getMessenger</H3><PRE>public <A HREF="../../../../net/jxta/endpoint/Messenger.html" title="interface in net.jxta.endpoint">Messenger</A> <B>getMessenger</B>(<A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A>&nbsp;addr)</PRE><DL><DD>Builds and returns an Messager that may be used to send messages via this endpoint to the specified destination.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/endpoint/EndpointService.html#getMessenger(net.jxta.endpoint.EndpointAddress)">getMessenger</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/endpoint/EndpointService.html" title="interface in net.jxta.endpoint">EndpointService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>addr</CODE> - the destination address.<DT><B>Returns:</B><DD>The messenger. null is returned if the destination address is not reachable.<DT><B>See Also:</B><DD><A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint"><CODE>EndpointAddress</CODE></A></DL></DD></DL><HR><A NAME="getMessenger(net.jxta.endpoint.EndpointAddress, java.lang.Object)"><!-- --></A><H3>getMessenger</H3><PRE>public <A HREF="../../../../net/jxta/endpoint/Messenger.html" title="interface in net.jxta.endpoint">Messenger</A> <B>getMessenger</B>(<A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A>&nbsp;addr,                              java.lang.Object&nbsp;hint)</PRE><DL><DD>Builds and returns an Messager that may be used to send messages via this endpoint to the specified destination.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/endpoint/EndpointService.html#getMessenger(net.jxta.endpoint.EndpointAddress, java.lang.Object)">getMessenger</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/endpoint/EndpointService.html" title="interface in net.jxta.endpoint">EndpointService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>addr</CODE> - the destination address.<DD><CODE>hint</CODE> - A hint to be supplied to whichever transport ends-up making the the real messenger. The hint is interpreted by the transport. The only transport known to consider hint is the endpoint router, and the hint is a route. As a result, if addr is in the form: jxta://peerID, then hint may be a RouteAdvertisement. If that route is valid the router will add it to it's cache of route and may then use it to succesfully create a messenger to the given destination. There is no garantee at this time that the route will end up being the one specified, nor that this route will be used only for this messenger (likely the opposite), nor that it will remain in use in the future, nor that it will be used at all. However, if there is no other route, and if the specified route is valid, it will be used rather than seeking an alternative.<DT><B>Returns:</B><DD>The messenger. null is returned if the destination address is not reachable.<DT><B>See Also:</B><DD><A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint"><CODE>EndpointAddress</CODE></A></DL></DD></DL><HR><A NAME="getMessenger(net.jxta.endpoint.MessengerEventListener, net.jxta.endpoint.EndpointAddress, java.lang.Object)"><!-- --></A><H3>getMessenger</H3><PRE>public boolean <B>getMessenger</B>(<A HREF="../../../../net/jxta/endpoint/MessengerEventListener.html" title="interface in net.jxta.endpoint">MessengerEventListener</A>&nbsp;listener,                            <A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A>&nbsp;addr,                            java.lang.Object&nbsp;hint)</PRE><DL><DD>Asynchronously acquire a messenger for the specified address. The  listener will be called when the messenger has been constructed.<P>

⌨️ 快捷键说明

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