Package oshi.software.os
Class OSService
java.lang.Object
oshi.software.os.OSService
Operating system services are responsible for the management of platform resources, including the processor, memory,
files, and input and output. They generally shield applications from the implementation details of the machine.
This class is provided for information purposes only. Interpretation of the meaning of services is platform-dependent.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionOSService
(String name, int processID, OSService.State state) Instantiate a newOSService
. -
Method Summary
-
Constructor Details
-
OSService
Instantiate a newOSService
.- Parameters:
name
- The service name.processID
- The process ID if running, or 0 if stopped.state
- The serviceOSService.State
.
-
-
Method Details
-
getName
Getter for the field
name
.- Returns:
- Returns the name of the service.
-
getProcessID
public int getProcessID()Getter for the field
processID
.- Returns:
- Returns the processID.
-
getState
Getter for the field
state
.- Returns:
- Returns the state of the service.
-