📄 peerinfoserviceinterface.html
字号:
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 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[] 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. <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><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 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="isLocalMonitoringAvailable()"><!-- --></A><H3>isLocalMonitoringAvailable</H3><PRE>public boolean <B>isLocalMonitoringAvailable</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></B></DD><DD>See if Local Monitoring is available on this Peer Local monitoring is only available if you are using a version of of jxta.jar that was build with metering activated. <p> See the document: <UL> <LI> <I> Building and Configuring JXTA with Monitoring Capabilities </I> </LI> </UL><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html#isLocalMonitoringAvailable()">isLocalMonitoringAvailable</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="isLocalMonitoringAvailable(net.jxta.platform.ModuleClassID)"><!-- --></A><H3>isLocalMonitoringAvailable</H3><PRE>public boolean <B>isLocalMonitoringAvailable</B>(<A HREF="../../../../net/jxta/platform/ModuleClassID.html" title="class in net.jxta.platform">ModuleClassID</A> moduleClassID)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></B></DD><DD>See if Local monitoring is available from a specific ServiceMonitor. Local monitoring is only available if you are using a version of of jxta.jar that was build with metering activated. <p> See the document: <UL> <LI> <I> Building and Configuring JXTA with Monitoring Capabilities </I> </LI> </UL><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html#isLocalMonitoringAvailable(net.jxta.platform.ModuleClassID)">isLocalMonitoringAvailable</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>moduleClassID</CODE> - The Module classID of the ServiceMonitor. Note that the ServiceMonitor moduleClassID is not the same as moduleClassID of the Service being monitored.</DL></DD></DL><HR><A NAME="getSupportedReportRates()"><!-- --></A><H3>getSupportedReportRates</H3><PRE>public long[] <B>getSupportedReportRates</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></B></DD><DD>Asynchronous reporting of Monitored data may be obtained only at rates supported by the MonitorManager on the peer. This method returns the locally supported rates (in milliseconds)<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html#getSupportedReportRates()">getSupportedReportRates</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="isSupportedReportRate(long)"><!-- --></A><H3>isSupportedReportRate</H3><PRE>public boolean <B>isSupportedReportRate</B>(long reportRate)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></B></DD><DD>Asynchronous reporting of Monitored data may be obtained only at rates supported by the MonitorManager on the peer. This method validates whether a specific rate (in milliseconds) is locally supported.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html#isSupportedReportRate(long)">isSupportedReportRate</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getBestReportRate(long)"><!-- --></A><H3>getBestReportRate</H3><PRE>public long <B>getBestReportRate</B>(long desiredReportRate)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></B></DD><DD>Asynchronous reporting of Monitored data may be obtained only at rates supported by the MonitorManager on the peer. This method supplies the closest (rounded up) rate (in milliseconds) to the specified rate that is locally supported.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html#getBestReportRate(long)">getBestReportRate</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getPeerMonitorInfo()"><!-- --></A><H3>getPeerMonitorInfo</H3><PRE>public <A HREF="../../../../net/jxta/meter/PeerMonitorInfo.html" title="class in net.jxta.meter">PeerMonitorInfo</A> <B>getPeerMonitorInfo</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></B></DD><DD>Obtain the monitoring capabilities of the Local Peer. <P> The PeerMonitorInfo provides: <UL> <LI> Whether any monitoring is available for this Peer </LI> <LI> The supported rates of asynchronous monitoring </LI> <LI> A list (as ModuleClassIDs) of ServiceMonitors attached to this Peer </LI> </UL><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html#getPeerMonitorInfo()">getPeerMonitorInfo</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getPeerMonitorInfo(net.jxta.peer.PeerID, net.jxta.meter.PeerMonitorInfoListener, long)"><!-- --></A><H3>getPeerMonitorInfo</H3><PRE>public void <B>getPeerMonitorInfo</B>(<A HREF="../../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> peerID, <A HREF="../../../../net/jxta/meter/PeerMonitorInfoListener.html" title="interface in net.jxta.meter">PeerMonitorInfoListener</A> peerMonitorInfoListener, long timeout) throws <A HREF="../../../../net/jxta/meter/MonitorException.html" title="class in net.jxta.meter">MonitorException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></B></DD><DD>Obtain the monitoring capabilities of a Remote Peer. <P> The PeerMonitorInfo provides: <UL> <LI> Whether any monitoring is available for this Peer </LI> <LI> The supported rates of asynchronous monitoring </LI> <LI> A list (as ModuleClassIDs) of ServiceMonitors attached to this Peer </LI> </UL> Via the PeerMonitorInfoListener, you will be informed of the PeerMonitorInfo or why it was not provided (error, timeout, unavailable, etc)<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html#getPeerMonitorInfo(net.jxta.peer.PeerID, net.jxta.meter.PeerMonitorInfoListener, long)">getPeerMonitorInfo</A></CODE> in interface <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>peerID</CODE> - The PeerID of the Peer you wish information about<DD><CODE>peerMonitorInfoListener</CODE> - The Listener to be told about the obtained PeerMonitorInfo<DD><CODE>timeout</CODE> - Generate a timeout event if no answer has been received in this time (in Milliseconds)<DT><B>Throws:</B><DD><CODE><A HREF="../../../../net/jxta/meter/MonitorException.html" title="class in net.jxta.meter">MonitorException</A></CODE></DL></DD></DL><HR><A NAME="getCumulativeMonitorReport(net.jxta.meter.MonitorFilter)"><!-- --></A><H3>getCumulativeMonitorReport</H3><PRE>public <A HREF="../../../../net/jxta/meter/MonitorReport.html" title="class in net.jxta.meter">MonitorReport</A> <B>getCumulativeMonitorReport</B>(<A HREF="../../../../net/jxta/meter/MonitorFilter.html" title="class in net.jxta.meter">MonitorFilter</A> monitorFilter) throws <A HREF="../../../../net/jxta/meter/MonitorException.html" title="class in net.jxta.meter">MonitorException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../net/jxta/peer/PeerInfoService.html" title="interface in net.jxta.peer">PeerInfoService</A></CODE></B></DD><DD>Get a MonitorReport of total accumulated metrics from the ServiceMonitors (specified in the MonitorFilter) since they were created/reset for the local Peer.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -