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

PEDiagnosticAgent

public class PEDiagnosticAgent extends Object implements DiagnosticAgent
DiagnosticAgent provides the main entry point to Diagnostic Service Back End.
author
mu125243

Fields Summary
private static Logger
logger
Constructors Summary
public PEDiagnosticAgent()
Creates a new instance of DiagnosticAgent

    
           
      
    
Methods Summary
public voiddeleteReport(java.lang.String fileName)
Delete report specified by the fileName

fileName
absolute path of the report to be deleted
throw
DiagnosticException

        if (fileName != null) {
            File file = new File(fileName);
            if(file.exists()) {
                file.delete();
            }
        }
    
public java.lang.StringgenerateReport(java.util.Map options)
Generates Diagnostic Report

param
clioptions cli options specified by the user
return
absolute path of zip containing diagnostic report
throw
DiagnosticException

        if(options != null) {
            BackendObjectFactory objectFactory = getBackendObjectFactory(options);
            ReportGenerator generator = objectFactory.createReportGenerator();
            return generator.generate().getName();
        }
        throw new DiagnosticException(" Null Input for report generation");
    
public java.lang.StringgenerateReport(java.util.Map clioptions, java.util.List instances, java.lang.String targetType)
Generates Diagnostic Report

param
clioptions cli options specified by the user
instances
list of instance names for which report generation is invoked
targetType
type of the target for which report is being generated
return
absolute path of zip containing diagnostic report
throw
DiagnosticException

        throw new DiagnosticException("Unsupported operation");
    
protected BackendObjectFactorygetBackendObjectFactory(java.util.Map input)
Returns BavkendObjectFactory

        return new PEBackendObjectFactory(input);
    
public java.util.ListgetConfidentialProperties(java.lang.String repositoryDir)

param
repositoryDir absolute path of central repository
return
list of attributes being masked with ****
throw
DiagnosticException

       return new DomainXMLHelper(repositoryDir).getAttrs();
    
private java.util.logging.LoggergetLogger()

        return logger;