FileDocCategorySizeDatePackage
SystemInfoCollector.javaAPI DocGlassfish v2 API3313Fri May 04 22:34:44 BST 2007com.sun.enterprise.diagnostics.collect

SystemInfoCollector

public class SystemInfoCollector extends Object implements Collector
Generic class to collect System Information.
author
Manisha Umbarje

Fields Summary
private String
destFolder
Constructors Summary
public SystemInfoCollector(String destFolder)
Creates a new instance of SystemInfoCollector

           
       
        this.destFolder = destFolder;
    
Methods Summary
public com.sun.enterprise.diagnostics.Datacapture()
Capture information

throw DiagnosticException

        Data systemInfo = null;
        Collector systemInfoCollector = null;
            String osName = System.getProperty("os.name");
            osName = osName.toUpperCase();

            if (osName.indexOf("WIN") >= 0) {
                systemInfoCollector = new WindowsSystemInfoCollector(destFolder);
            }
            else if (osName.indexOf("SUNOS") >= 0) {
                systemInfoCollector = new SolarisSystemInfoCollector(destFolder);
            } else if (osName.indexOf("LINUX") >= 0) {
                systemInfoCollector = new LinuxSystemInfoCollector(destFolder);
            }

        if(systemInfoCollector !=null){
            systemInfo =  systemInfoCollector.capture();
        }
        return systemInfo;