Project JXTA

net.jxta.meter
Interface ServiceMonitor

All Superinterfaces:
Module

public interface ServiceMonitor
extends Module

The base interface for all ServiceMonitors For complete information about Service Monitors see the Document Designing and Implementing Service Monitors


Field Summary
 
Fields inherited from interface net.jxta.platform.Module
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK
 
Method Summary
 void beginCumulativeReport()
          A request for a cumulative Report(s) are coming, prepare to receive them
 ServiceMonitorFilter createSupportedCumulativeServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter)
          Transform the provided ServiceMonitorFilter into one that is supported for cumulative reporting
 ServiceMonitorFilter createSupportedServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter, long reportRate)
          Transform the provided ServiceMonitorFilter into one that is supported for periodic reporting at the specified rate
 void destroy()
          Clean up.
 void endCumulativeReport()
          Indication that the flurry of requests for cumulative Report is over
 ServiceMetric getCumulativeServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime)
          Get ServiceMetrics since the start (or last reset time) of this ServiceMonitor.
 ModuleClassID getModuleClassID()
          Get ModuleClassID of this ServiceMonitor
 ServiceMetric getServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime, int pulseIndex, long reportRate)
          Get ServiceMetrics accrued in during this pulse interval
 void serviceMonitorFilterDeregistered(ServiceMonitorFilter serviceMonitorFilter, int reportRateIndex, long reportRate, boolean retiredRate)
          Information that the Monitor Manager is deregistering the Monitoring for this filter at this rate
 void serviceMonitorFilterRegistered(ServiceMonitorFilter serviceMonitorFilter, int reportRateIndex, long reportRate, boolean newRate)
          Information that the Monitor Manager has accepted a Monitoring for this filter at this rate
 void validateCumulativeServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter)
          Validate ServiceMonitorFilter for a cumulative Report
 void validateServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter, long reportRate)
          Validate ServiceMonitorFilter for a periodic Reporting
 
Methods inherited from interface net.jxta.platform.Module
init, startApp, stopApp
 

Method Detail

getModuleClassID

ModuleClassID getModuleClassID()
Get ModuleClassID of this ServiceMonitor


getServiceMetric

ServiceMetric getServiceMetric(ServiceMonitorFilter serviceMonitorFilter,
                               long fromTime,
                               long toTime,
                               int pulseIndex,
                               long reportRate)
Get ServiceMetrics accrued in during this pulse interval

Parameters:
serviceMonitorFilter - Filter Metrics based upon this MonitorFilter
fromTime - Beginning time as determined by the MonitorManager
toTime - Ending time as determined by the MonitorManager
pulseIndex - Pulse Index of the reporting rate Pyramid
reportRate - Reporting Rate (corresponding to the PulseNumber's index)

beginCumulativeReport

void beginCumulativeReport()
A request for a cumulative Report(s) are coming, prepare to receive them

See Also:
endCumulativeReport()

getCumulativeServiceMetric

ServiceMetric getCumulativeServiceMetric(ServiceMonitorFilter serviceMonitorFilter,
                                         long fromTime,
                                         long toTime)
Get ServiceMetrics since the start (or last reset time) of this ServiceMonitor. Calls to this will only occurr between calls to beginCumulativeReport() and endCumulativeReport()

Parameters:
serviceMonitorFilter - Filter Metrics based upon this MonitorFilter
fromTime - Beginning time as determined by the MonitorManager
toTime - Ending time as determined by the MonitorManager
See Also:
beginCumulativeReport(), endCumulativeReport()

endCumulativeReport

void endCumulativeReport()
Indication that the flurry of requests for cumulative Report is over

See Also:
beginCumulativeReport()

validateCumulativeServiceMonitorFilter

void validateCumulativeServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter)
                                            throws MonitorFilterException
Validate ServiceMonitorFilter for a cumulative Report

Throws:
MonitorFilterException

validateServiceMonitorFilter

void validateServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter,
                                  long reportRate)
                                  throws MonitorFilterException
Validate ServiceMonitorFilter for a periodic Reporting

Throws:
MonitorFilterException

createSupportedCumulativeServiceMonitorFilter

ServiceMonitorFilter createSupportedCumulativeServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter)
                                                                   throws MonitorFilterException
Transform the provided ServiceMonitorFilter into one that is supported for cumulative reporting

Throws:
MonitorFilterException

createSupportedServiceMonitorFilter

ServiceMonitorFilter createSupportedServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter,
                                                         long reportRate)
                                                         throws MonitorFilterException
Transform the provided ServiceMonitorFilter into one that is supported for periodic reporting at the specified rate

Throws:
MonitorFilterException

serviceMonitorFilterRegistered

void serviceMonitorFilterRegistered(ServiceMonitorFilter serviceMonitorFilter,
                                    int reportRateIndex,
                                    long reportRate,
                                    boolean newRate)
Information that the Monitor Manager has accepted a Monitoring for this filter at this rate

Parameters:
serviceMonitorFilter - Accepted Filter
reportRateIndex - Pulse Index into pyramid of accepted rate
reportRate - Accepted reporting rate
newRate - Is this a new reporting rate (ie you don't have any currently registered at this rate)

serviceMonitorFilterDeregistered

void serviceMonitorFilterDeregistered(ServiceMonitorFilter serviceMonitorFilter,
                                      int reportRateIndex,
                                      long reportRate,
                                      boolean retiredRate)
Information that the Monitor Manager is deregistering the Monitoring for this filter at this rate

Parameters:
serviceMonitorFilter - Deregistered Filter
reportRateIndex - Pulse Index into pyramid of deregistered filter
reportRate - Reporting rate of deregistered filter
retiredRate - Is this a retired filter the last one registered at this rate (ie you don't have to keep metrics for this rate any longer)

destroy

void destroy()
Clean up. The PeerGroup is probably about to be destroyed


JXTA J2SE