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

ReportConfig

public class ReportConfig extends Object
Combined representation of diagnostic-service config elements in domain.xml and command line options provided by the user at the time of report generation.
author
Manisha Umbarje

Fields Summary
private CLIOptions
options
private ReportTarget
target
private ExecutionContext
context
private List
configurations
Constructors Summary
public ReportConfig(CLIOptions cliOptions, ReportTarget target, ExecutionContext context)
Creates new instance of ReportConfig object

        options = cliOptions;
        this.target = target;
        this.context = context;
        initialize();
    
Methods Summary
public voidaddInstanceConfigs(java.util.List configs)

        if(configs != null) {
            Iterator<ServiceConfig> iterator = configs.iterator();
            while(iterator.hasNext()) {
                addInstanceSpecificConfig(iterator.next());
            }
        }
    
public voidaddInstanceSpecificConfig(ServiceConfig config)
Add diagnostic service configuration corresponding to a instance

param
config diagnostic service config element from domain.xml

        if(config != null) {
            configurations.add(config);
        }
    
public CLIOptionsgetCLIOptions()

return
CLIOptons

        return options;
    
public ExecutionContextgetExecutionContext()
Returns Execution context

        return context;
    
public ServiceConfiggetInstanceConfigByName(java.lang.String name)

        ServiceConfig instanceConfig = null;
        for(ServiceConfig config : configurations){
            if(config.getInstanceName().equalsIgnoreCase(name)){
                instanceConfig = config;
                break;
            }
        }
        return instanceConfig;
    
public java.util.IteratorgetInstanceConfigurations()
In PE, only one configuration is returned. In SE/EE the report generation may be invoked for multiple instances

return
list of configurations

         return configurations.iterator();
    
public ReportTargetgetTarget()
returns ReportTarget

return
target

        return target;
    
private voidinitialize()

        configurations = new ArrayList();
    
public java.lang.StringtoString()

        return options.toString() + target.toString() +  
                context.toString() +  configurations;