Project JXTA

net.jxta.meter
Class MonitorReport

java.lang.Object
  extended bynet.jxta.meter.MonitorReport
All Implemented Interfaces:
DocumentSerializable

public class MonitorReport
extends Object
implements DocumentSerializable

A Monitor Report contains service-specific metrics for each service specified in the corresponding MonitorFilter (provided when the report was requested).


Constructor Summary
MonitorReport()
          Monitor Reports are generally not created by applications, but by the Monitor or PeerInfoService
MonitorReport(long fromTime, long toTime, boolean isCumulative)
          Monitor Reports are generally not created by applications, but by the Monitor or PeerInfoService
 
Method Summary
 void addServiceMetric(ModuleClassID moduleClassID, ServiceMetric serviceMetric)
          addServiceMetric are generally not created by applications, but by the Monitor or PeerInfoService
 void addServiceMetric(ServiceMetric serviceMetric)
          addServiceMetric are generally not created by applications, but by the Monitor or PeerInfoService
 long getFromTime()
          Begin time that this report is representing
 ServiceMetric getServiceMetric(ModuleClassID moduleClassID)
          Get the contained service-specific ServiceMetric for the specified ServiceMonitor's classID
 Iterator getServiceMetrics()
          Get the contained service-specific ServiceMetrics
 long getToTime()
          End time that this report is representing
 Iterator getUnknownModuleClassIDs()
          Get iterator of ModuleClassIDs of serviceMetrics for which there weren't registered ServiceMetric classes
 void initializeFrom(Element element)
          
 boolean isCumulative()
          Does this report contain metrics from the last time the monitor was reset or is this a delta report
 boolean isUnknownModuleClassIDs()
          Did this report contain any serviceMetrics for which there weren't registered ServiceMetric classes
 void serializeTo(Element element)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitorReport

public MonitorReport()
Monitor Reports are generally not created by applications, but by the Monitor or PeerInfoService


MonitorReport

public MonitorReport(long fromTime,
                     long toTime,
                     boolean isCumulative)
Monitor Reports are generally not created by applications, but by the Monitor or PeerInfoService

Parameters:
fromTime -
toTime -
isCumulative -
Method Detail

getFromTime

public long getFromTime()
Begin time that this report is representing


getToTime

public long getToTime()
End time that this report is representing

Returns:
long

isCumulative

public boolean isCumulative()
Does this report contain metrics from the last time the monitor was reset or is this a delta report


getServiceMetrics

public Iterator getServiceMetrics()
Get the contained service-specific ServiceMetrics


getServiceMetric

public ServiceMetric getServiceMetric(ModuleClassID moduleClassID)
Get the contained service-specific ServiceMetric for the specified ServiceMonitor's classID

Parameters:
moduleClassID - ServiceMonitor's classID
Returns:
ServiceMetric ServiceMetric or null if Not Found

addServiceMetric

public void addServiceMetric(ServiceMetric serviceMetric)
addServiceMetric are generally not created by applications, but by the Monitor or PeerInfoService


addServiceMetric

public void addServiceMetric(ModuleClassID moduleClassID,
                             ServiceMetric serviceMetric)
addServiceMetric are generally not created by applications, but by the Monitor or PeerInfoService


isUnknownModuleClassIDs

public boolean isUnknownModuleClassIDs()
Did this report contain any serviceMetrics for which there weren't registered ServiceMetric classes

See Also:
MonitorResources

getUnknownModuleClassIDs

public Iterator getUnknownModuleClassIDs()
Get iterator of ModuleClassIDs of serviceMetrics for which there weren't registered ServiceMetric classes

Returns:
Iterator

serializeTo

public void serializeTo(Element element)
                 throws DocumentSerializationException

Specified by:
serializeTo in interface DocumentSerializable
Throws:
DocumentSerializationException

initializeFrom

public void initializeFrom(Element element)
                    throws DocumentSerializationException

Specified by:
initializeFrom in interface DocumentSerializable
Throws:
DocumentSerializationException

JXTA J2SE