com.sun.management.oss.impl.job.opstatus
Class ReportElement

java.lang.Object
  extended bycom.sun.management.oss.impl.job.opstatus.ReportElement

public class ReportElement
extends java.lang.Object

ReportElement provides facility for XML reporting.


Constructor Summary
ReportElement(OperationalStatusMonitorValue pmValue, OperationalStatusGenericModel model)
          Creates a ReportElement with DataElement instances and operational monitoring job information to include in the XML report.
 
Method Summary
 long getCollectionTime()
          Returns the time when the last data collection took place.
 java.lang.String getReportByEvent(boolean isInstant)
          Gets the XML by event report associated to this object.
 java.lang.String getReportByFile(boolean isInstant, java.net.URL url, java.util.Date expirationDate)
          Gets the XML by file report associated to this object.
 boolean setMonitoredObjects(javax.management.ObjectName[] objectNames)
          Set the monitored objects (denoted by their object names) to observe and perform a collection process.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportElement

public ReportElement(OperationalStatusMonitorValue pmValue,
                     OperationalStatusGenericModel model)
Creates a ReportElement with DataElement instances and operational monitoring job information to include in the XML report.

Parameters:
pmValue - the monitoring job described in the section.
model - where data will be retreived.
Method Detail

getCollectionTime

public long getCollectionTime()
Returns the time when the last data collection took place.

Returns:
the time when the last data collection took place.

getReportByEvent

public java.lang.String getReportByEvent(boolean isInstant)
Gets the XML by event report associated to this object.

Parameters:
isInstant - if true, all MonitoredObjectElement are included; otherwise only the ones that had attribute changes.
Returns:
the XML by event report associated to this object.

getReportByFile

public java.lang.String getReportByFile(boolean isInstant,
                                        java.net.URL url,
                                        java.util.Date expirationDate)
Gets the XML by file report associated to this object.

Parameters:
isInstant - if true, all MonitoredObjectElement are included; otherwise only the ones that had attribute changes.
url - URL location where measurements must be saved (must be a file).
expirationDate - time from the save measurements are obsolate (null means never delete).
Returns:
the XML by file report associated to this object.

setMonitoredObjects

public boolean setMonitoredObjects(javax.management.ObjectName[] objectNames)
Set the monitored objects (denoted by their object names) to observe and perform a collection process.

Parameters:
objectNames - the object names (in String format) of the monitored objects to observe.
Returns:
true, if at least one of the monitored object had attribute changes since last collection; false otherwise.