public class OperatingSystemImpl extends AbstractOshiJsonObject implements OperatingSystem
| Constructor and Description |
|---|
OperatingSystemImpl(OperatingSystem operatingSystem)
Creates a new platform-specific OperatingSystem object wrapping the
provided argument
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFamily()
Operating system family.
|
FileSystem |
getFileSystem()
Instantiates a
FileSystem object. |
String |
getManufacturer()
Manufacturer.
|
NetworkParams |
getNetworkParams()
Instantiates a
NetworkParams object. |
OSProcess |
getProcess(int pid)
Gets information on a currently running process
|
int |
getProcessCount()
Get the number of processes currently running
|
OSProcess[] |
getProcesses(int limit,
OperatingSystem.ProcessSort sort)
Gets currently running processes.
|
int |
getProcessId()
Gets the current process ID
|
int |
getThreadCount()
Get the number of threads currently running
|
OperatingSystemVersion |
getVersion()
Operating system version.
|
javax.json.JsonObject |
toJSON(Properties properties)
Returns this object as a
JsonObject. |
String |
toString() |
toCompactJSON, toCompactJSON, toJSON, toPrettyJSON, toPrettyJSONclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittoCompactJSON, toCompactJSON, toJSON, toPrettyJSON, toPrettyJSONpublic OperatingSystemImpl(OperatingSystem operatingSystem)
operatingSystem - a platform-specific OperatingSystem objectpublic String getFamily()
getFamily in interface OperatingSystempublic String getManufacturer()
getManufacturer in interface OperatingSystempublic OperatingSystemVersion getVersion()
getVersion in interface OperatingSystempublic FileSystem getFileSystem()
FileSystem object.getFileSystem in interface OperatingSystemFileSystem object.public OSProcess[] getProcesses(int limit, OperatingSystem.ProcessSort sort)
getProcesses in interface OperatingSystemlimit - Max number of results to return, or 0 to return all resultssort - If not null, determines sorting of resultsOSProcess objects for the
specified number (or all) of currently running processes, sorted
as specifiedpublic OSProcess getProcess(int pid)
getProcess in interface OperatingSystempid - A process IDOSProcess object for the specified
process id if it is running; null otherwise currently running
processespublic int getProcessId()
getProcessId in interface OperatingSystempublic int getProcessCount()
getProcessCount in interface OperatingSystempublic int getThreadCount()
getThreadCount in interface OperatingSystempublic NetworkParams getNetworkParams()
NetworkParams object.getNetworkParams in interface OperatingSystemNetworkParams object.public javax.json.JsonObject toJSON(Properties properties)
JsonObject. The provided
properties will be set on this object to configure the type of
information returned using this and future invocations of
OshiJsonObject.toJSON().toJSON in interface OshiJsonObjectproperties - Properties to configure returned resultsJsonObject for this class.public String toString()
toString in class AbstractOshiJsonObjectCopyright © 2010–2017 oshi. All rights reserved.