Package com.ferrumx.system.networking
Class Win32_NetworkAdapterConfiguration
java.lang.Object
com.ferrumx.system.networking.Win32_NetworkAdapterConfiguration
This class queries the Win32_NetworkAdapterConfiguration class of WMI and
fetches additional information related to
Win32_NetworkAdapter
.
The following properties are extracted:
IPEnabled, IPAddress, IPSubnet, DefaultIPGateway, DHCPEnabled, DHCPServer, DHCPLeaseObtained, DHCPLeaseExpires, DNSHostName, DNSServerSearchOrder
- Author:
- Egg-03
-
Method Summary
Modifier and TypeMethodDescriptiongetAdapterConfiguration
(String adapterIndex) Fetches the properties described in the class description for a particular adapter index
-
Method Details
-
getAdapterConfiguration
public static Map<String,String> getAdapterConfiguration(String adapterIndex) throws IOException, IndexOutOfBoundsException, ShellException, InterruptedException Fetches the properties described in the class description for a particular adapter index- Parameters:
adapterIndex
- fetched fromWin32_NetworkAdapterSetting.getIndex(String)
- Returns:
- a
Map
of all the properties mentioned in the class description for a particular network adapter - 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();
-