Package oshi.hardware.platform.linux
Class LinuxHardwareAbstractionLayer
java.lang.Object
oshi.hardware.common.AbstractHardwareAbstractionLayer
oshi.hardware.platform.linux.LinuxHardwareAbstractionLayer
- All Implemented Interfaces:
HardwareAbstractionLayer
@ThreadSafe public final class LinuxHardwareAbstractionLayer extends AbstractHardwareAbstractionLayer
LinuxHardwareAbstractionLayer class.
-
Constructor Summary
Constructors Constructor Description LinuxHardwareAbstractionLayer()
-
Method Summary
Modifier and Type Method Description ComputerSystem
createComputerSystem()
Instantiates the platform-specificComputerSystem
objectGlobalMemory
createMemory()
Instantiates the platform-specificGlobalMemory
objectCentralProcessor
createProcessor()
Instantiates the platform-specificCentralProcessor
objectSensors
createSensors()
Instantiates the platform-specificSensors
objectHWDiskStore[]
getDiskStores()
Instantiates an array ofHWDiskStore
objects, representing a physical hard disk or other similar storage deviceDisplay[]
getDisplays()
Instantiates an array ofDisplay
objects, representing monitors or other video output devices.GraphicsCard[]
getGraphicsCards()
Instantiates an array ofGraphicsCard
objects, representing the Graphics cards.NetworkIF[]
getNetworkIFs()
Instantiates an array ofNetworkIF
objects, representing a network interfacePowerSource[]
getPowerSources()
Instantiates an array ofPowerSource
objects, representing batteries, etc.SoundCard[]
getSoundCards()
Instantiates an array ofSoundCard
objects, representing the Sound cards.UsbDevice[]
getUsbDevices(boolean tree)
Instantiates an array ofUsbDevice
objects, representing devices connected via a usb port (including internal devices).Methods inherited from class oshi.hardware.common.AbstractHardwareAbstractionLayer
getComputerSystem, getMemory, getProcessor, getSensors
-
Constructor Details
-
LinuxHardwareAbstractionLayer
public LinuxHardwareAbstractionLayer()
-
-
Method Details
-
createComputerSystem
Description copied from class:AbstractHardwareAbstractionLayer
Instantiates the platform-specificComputerSystem
object- Specified by:
createComputerSystem
in classAbstractHardwareAbstractionLayer
- Returns:
- platform-specific
ComputerSystem
object
-
createMemory
Description copied from class:AbstractHardwareAbstractionLayer
Instantiates the platform-specificGlobalMemory
object- Specified by:
createMemory
in classAbstractHardwareAbstractionLayer
- Returns:
- platform-specific
GlobalMemory
object
-
createProcessor
Description copied from class:AbstractHardwareAbstractionLayer
Instantiates the platform-specificCentralProcessor
object- Specified by:
createProcessor
in classAbstractHardwareAbstractionLayer
- Returns:
- platform-specific
CentralProcessor
object
-
createSensors
Description copied from class:AbstractHardwareAbstractionLayer
Instantiates the platform-specificSensors
object- Specified by:
createSensors
in classAbstractHardwareAbstractionLayer
- Returns:
- platform-specific
Sensors
object
-
getPowerSources
Description copied from interface:HardwareAbstractionLayer
Instantiates an array ofPowerSource
objects, representing batteries, etc.- Returns:
- An array of PowerSource objects or an empty array if none are present.
-
getDiskStores
Description copied from interface:HardwareAbstractionLayer
Instantiates an array ofHWDiskStore
objects, representing a physical hard disk or other similar storage device- Returns:
- An array of HWDiskStore objects or an empty array if none are present.
-
getDisplays
Description copied from interface:HardwareAbstractionLayer
Instantiates an array ofDisplay
objects, representing monitors or other video output devices.- Returns:
- An array of Display objects or an empty array if none are present.
-
getNetworkIFs
Description copied from interface:HardwareAbstractionLayer
Instantiates an array ofNetworkIF
objects, representing a network interface- Returns:
- An array of HWNetworkStore objects or an empty array if none are present.
-
getUsbDevices
Description copied from interface:HardwareAbstractionLayer
Instantiates an array ofUsbDevice
objects, representing devices connected via a usb port (including internal devices).If the value of tree is true, the top level devices returned from this method are the USB Controllers; connected hubs and devices in its device tree share that controller's bandwidth. If the value of tree is false, USB devices (not controllers) are listed in a single flat array.
- Parameters:
tree
- Whether to display devices in a nested tree format from their controllers- Returns:
- An array of UsbDevice objects representing (optionally) the USB Controllers and devices connected to them, or an empty array if none are present
-
getSoundCards
Description copied from interface:HardwareAbstractionLayer
Instantiates an array ofSoundCard
objects, representing the Sound cards.- Returns:
- An array of SoundCard objects or an empty array if none are present.
-
getGraphicsCards
Description copied from interface:HardwareAbstractionLayer
Instantiates an array ofGraphicsCard
objects, representing the Graphics cards.- Returns:
- An array of GraphicsCard objects or an empty array if none are present.
-