Package com.ferrumx.system.hardware
Class Win32_DesktopMonitor
java.lang.Object
com.ferrumx.system.hardware.Win32_DesktopMonitor
This class queries the Win32_Desktop class of WMI and represents the Monitor
details of your system.
Fetches the following properties: Name, PNPDeviceID, Status, MonitorManufacturer, MonitorType, PixelsPerXLogicalInch, PixelsPerYLogicalInch
- Author:
- Egg-03
-
Method Summary
Modifier and TypeMethodDescriptionThis method fetches a list of Monitors present in the system based on their IDsgetMonitorProperties
(String deviceID) This method fetches the Monitor properties based on the given DeviceID
-
Method Details
-
getMonitorID
public static List<String> getMonitorID() throws IOException, IndexOutOfBoundsException, ShellException, InterruptedExceptionThis method fetches a list of Monitors present in the system based on their IDs- Returns:
- a
List
of Monitor Device IDs - Throws:
IOException
- re-throws the exception thrown byCIM_ML.getPropertyValue(String, String)
when there are I/O Errors during streaming of data from and to Powershell and other generated filesIndexOutOfBoundsException
- re-throws the exception thrown byCIM_ML.getPropertyValue(String, String)
when there is a parsing error of data fetched from Windows PowershellShellException
- if any internal command used in the powershell throws errorsInterruptedException
- if the thread waiting for the process to exit, gets interrupted. When catching this exception, you may re-throw it's interrupted status by using Thread.currentThread().interrupt();
-
getMonitorProperties
public static Map<String,String> getMonitorProperties(String deviceID) throws IOException, IndexOutOfBoundsException, ShellException, InterruptedException This method fetches the Monitor properties based on the given DeviceID- Parameters:
deviceID
- fetched fromgetMonitorID()
- Returns:
- a
Map
of Monitor properties and their values mentioned in the class description - Throws:
IOException
- re-throws the exception thrown byCIM_ML.getPropertiesAndTheirValuesWhere(String, String, String, String)
when there are I/O Errors during streaming of data from and to Powershell and other generated filesIndexOutOfBoundsException
- re-throws the exception thrown byCIM_ML.getPropertiesAndTheirValuesWhere(String, String, String, String)
when there is a parsing error of data fetched from Windows PowershellShellException
- if any internal command used in the powershell throws errorsInterruptedException
- if the thread waiting for the process to exit, gets interrupted. When catching this exception, you may re-throw it's interrupted status by using Thread.currentThread().interrupt();
-