FileDocCategorySizeDatePackage
ReportGenerator.javaAPI DocGlassfish v2 API3949Fri May 04 22:34:40 BST 2007com.sun.enterprise.diagnostics

ReportGenerator

public class ReportGenerator extends Object
Collects data, generates HTML report and archives it if mode is local
author
mu125243

Fields Summary
protected com.sun.enterprise.diagnostics.ReportConfig
config
protected com.sun.enterprise.diagnostics.collect.Collector
harvester
protected com.sun.enterprise.diagnostics.report.html.HTMLReportWriter
reportWriter
Constructors Summary
public ReportGenerator(com.sun.enterprise.diagnostics.ReportConfig config, com.sun.enterprise.diagnostics.collect.Collector harvester, com.sun.enterprise.diagnostics.report.html.HTMLReportWriter reportWriter)
Creates a new instance of ReportGenerator

        this.config = config;
        this.harvester = harvester;
        this.reportWriter = reportWriter;
    
Methods Summary
protected java.util.zip.ZipFilearchive(ReportTarget target, java.lang.String archiveName)

        return new Archiver().archive(config.getTarget(), archiveName);
    
private com.sun.enterprise.diagnostics.DatacollectData()

        if(harvester != null) {
            ((com.sun.enterprise.diagnostics.collect.Harvester)harvester).initialize();
            return harvester.capture();
        }
        throw new DiagnosticException("Harvester null");
    
public java.util.zip.ZipFilegenerate()
Captures data, writes HTML report and archives it in local mode

return
Data object

        Data data = collectData();
        writeReportSummary(data);
        return archive(config.getTarget(), config.getCLIOptions().getReportFile());
    
protected voidwriteReportSummary(com.sun.enterprise.diagnostics.Data data)

        if(reportWriter != null) 
            reportWriter.writeReportSummary(data);
        else
            throw new DiagnosticException("HTML Report writer == null");