Class WindowsOperatingSystemFFM
java.lang.Object
oshi.software.common.AbstractOperatingSystem
oshi.software.os.windows.WindowsOperatingSystem
oshi.software.os.windows.WindowsOperatingSystemFFM
- All Implemented Interfaces:
OperatingSystem
-
Nested Class Summary
Nested classes/interfaces inherited from interface OperatingSystem
OperatingSystem.OSVersionInfo, OperatingSystem.ProcessFiltering, OperatingSystem.ProcessSorting -
Field Summary
Fields inherited from class AbstractOperatingSystem
USE_WHO_COMMAND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a list of installed applications on the system.Instantiates aInternetProtocolStatsobject.Instantiates aNetworkParamsobject.intGets the current process ID (PID).longGet Unix time of boot.longGet the System up time (time since boot).intGet the number of threads currently runningintMakes a best effort to get the current thread ID (TID).booleanDetermine whether the current process has elevated permissions such as sudo / AdministratorMethods inherited from class WindowsOperatingSystem
getCurrentThread, getDesktopWindows, getFileSystem, getProcess, getProcessCount, getProcesses, getServices, getSessions, queryAllProcesses, queryBitness, queryChildProcesses, queryDescendantProcesses, queryFamilyVersionInfo, queryManufacturerMethods inherited from class AbstractOperatingSystem
getBitness, getChildProcesses, getChildrenOrDescendants, getChildrenOrDescendants, getDescendantProcesses, getFamily, getManufacturer, getProcesses, getVersionInfo, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface OperatingSystem
getCurrentProcess, getProcesses
-
Constructor Details
-
WindowsOperatingSystemFFM
public WindowsOperatingSystemFFM()
-
-
Method Details
-
getInstalledApplications
Description copied from interface:OperatingSystemRetrieves a list of installed applications on the system.This method is implemented per OS. If the OS does not support this feature, it returns an empty list.
- Specified by:
getInstalledApplicationsin interfaceOperatingSystem- Overrides:
getInstalledApplicationsin classWindowsOperatingSystem- Returns:
- A list of installed applications or an empty list if unsupported.
-
getInternetProtocolStats
Description copied from interface:OperatingSystemInstantiates aInternetProtocolStatsobject.- Specified by:
getInternetProtocolStatsin interfaceOperatingSystem- Overrides:
getInternetProtocolStatsin classWindowsOperatingSystem- Returns:
- a
InternetProtocolStatsobject.
-
getNetworkParams
Description copied from interface:OperatingSystemInstantiates aNetworkParamsobject.- Specified by:
getNetworkParamsin interfaceOperatingSystem- Overrides:
getNetworkParamsin classWindowsOperatingSystem- Returns:
- A
NetworkParamsobject.
-
isElevated
public boolean isElevated()Description copied from interface:OperatingSystemDetermine whether the current process has elevated permissions such as sudo / Administrator- Specified by:
isElevatedin interfaceOperatingSystem- Overrides:
isElevatedin classWindowsOperatingSystem- Returns:
- True if this process has elevated permissions
-
getProcessId
public int getProcessId()Description copied from interface:OperatingSystemGets the current process ID (PID).- Specified by:
getProcessIdin interfaceOperatingSystem- Overrides:
getProcessIdin classWindowsOperatingSystem- Returns:
- the Process ID of the current process
-
getSystemBootTime
public long getSystemBootTime()Description copied from interface:OperatingSystemGet Unix time of boot.- Specified by:
getSystemBootTimein interfaceOperatingSystem- Overrides:
getSystemBootTimein classWindowsOperatingSystem- Returns:
- The approximate time at which the system booted, in seconds since the Unix epoch.
-
getSystemUptime
public long getSystemUptime()Description copied from interface:OperatingSystemGet the System up time (time since boot).- Specified by:
getSystemUptimein interfaceOperatingSystem- Overrides:
getSystemUptimein classWindowsOperatingSystem- Returns:
- Number of seconds since boot.
-
getThreadCount
public int getThreadCount()Description copied from interface:OperatingSystemGet the number of threads currently running- Specified by:
getThreadCountin interfaceOperatingSystem- Overrides:
getThreadCountin classWindowsOperatingSystem- Returns:
- The number of threads running
-
getThreadId
public int getThreadId()Description copied from interface:OperatingSystemMakes a best effort to get the current thread ID (TID). May not be useful in a multithreaded environment. The thread ID returned may have been short lived and no longer exist.Thread IDs on macOS are not correlated with any other Operating System output.
- Specified by:
getThreadIdin interfaceOperatingSystem- Overrides:
getThreadIdin classWindowsOperatingSystem- Returns:
- the Thread ID of the current thread if known, 0 otherwise.
-