WindowsSystemInfoProvider.java revision b87033953be26b0dc7dead8febd499b666a54126
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: WindowsSystemInfoProvider.java,v 1.1 2008/11/22 02:24:32 ak138937 Exp $
*
*/
public class WindowsSystemInfoProvider extends SystemInfoProvider {
public WindowsSystemInfoProvider() {
}
/**
* This method gets the Windows system information
*
* @return sysDetailsHM Hashmap containing the Window system information.
*/
public HashMap getSystemInformation() {
return sysDetailsHM;
}
/**
* This method is called to get the available RAM space
*
* @return RAMdetected_MB the available RAM space
*/
private long checkRAMAvailability() {
long RAMdetected_MB = 0;
try {
//TODO: Get RAM information
}
return RAMdetected_MB;
}
/**
* This method gets the required swap space and queries the system
* for the installed swap space.
*
* @return the Available Swap Memory
*/
private long checkSwapAvailability() {
long swapDetected_MB = 0;
try {
//TODO: Get Swap information
}
return swapDetected_MB;
}
/**
* This method is used to get the architecture of the system
*
* @return cpuArch returns the architecture of the system
*/
public String getOSCPUArch() {
try {
"WindowsSystemInfoProvider.getOSCPUArch : " +
"Exception in executing systeminfo command", ex);
}
}
/**
* This method is called to get the domain name.
*
* @return string domain Name string
*/
public String getDomainNameFromCommand() {
boolean found = false;
try {
if (idx != -1) {
found = true;
}
}
}
found = false;
searchStr = "domain";
if (idx != -1) {
found = true;
}
}
}
}
"WindowsSystemInfoProvider.getDomainNameFromCommand : " +
"Exception in executing ipconfig command", cmdExp);
domainName = "";
}
return domainName;
}
}