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 ComputerSystemcreateComputerSystem()Instantiates the platform-specificComputerSystemobjectGlobalMemorycreateMemory()Instantiates the platform-specificGlobalMemoryobjectCentralProcessorcreateProcessor()Instantiates the platform-specificCentralProcessorobjectSensorscreateSensors()Instantiates the platform-specificSensorsobjectjava.util.List<HWDiskStore>getDiskStores()Instantiates anUnmodifiableListofHWDiskStoreobjects, representing physical hard disks or other similar storage devicesjava.util.List<Display>getDisplays()Instantiates anUnmodifiableListofDisplayobjects, representing monitors or other video output devices.java.util.List<GraphicsCard>getGraphicsCards()Instantiates anUnmodifiableListofGraphicsCardobjects, representing the Graphics cards.java.util.List<NetworkIF>getNetworkIFs()Gets a list ofNetworkIFobjects, representing a network interfacejava.util.List<PowerSource>getPowerSources()Instantiates anUnmodifiableListofPowerSourceobjects, representing batteries, etc.java.util.List<SoundCard>getSoundCards()Instantiates anUnmodifiableListofSoundCardobjects, representing the Sound cards.java.util.List<UsbDevice>getUsbDevices(boolean tree)Instantiates anUnmodifiableListofUsbDeviceobjects, 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:AbstractHardwareAbstractionLayerInstantiates the platform-specificComputerSystemobject- Specified by:
createComputerSystemin classAbstractHardwareAbstractionLayer- Returns:
- platform-specific
ComputerSystemobject
-
createMemory
Description copied from class:AbstractHardwareAbstractionLayerInstantiates the platform-specificGlobalMemoryobject- Specified by:
createMemoryin classAbstractHardwareAbstractionLayer- Returns:
- platform-specific
GlobalMemoryobject
-
createProcessor
Description copied from class:AbstractHardwareAbstractionLayerInstantiates the platform-specificCentralProcessorobject- Specified by:
createProcessorin classAbstractHardwareAbstractionLayer- Returns:
- platform-specific
CentralProcessorobject
-
createSensors
Description copied from class:AbstractHardwareAbstractionLayerInstantiates the platform-specificSensorsobject- Specified by:
createSensorsin classAbstractHardwareAbstractionLayer- Returns:
- platform-specific
Sensorsobject
-
getPowerSources
Description copied from interface:HardwareAbstractionLayerInstantiates anUnmodifiableListofPowerSourceobjects, representing batteries, etc.- Returns:
- An
UnmodifiableListof PowerSource objects or an empty array if none are present.
-
getDiskStores
Description copied from interface:HardwareAbstractionLayerInstantiates anUnmodifiableListofHWDiskStoreobjects, representing physical hard disks or other similar storage devices- Returns:
- An
UnmodifiableListof HWDiskStore objects or an empty list if none are present.
-
getDisplays
Description copied from interface:HardwareAbstractionLayerInstantiates anUnmodifiableListofDisplayobjects, representing monitors or other video output devices.- Returns:
- An
UnmodifiableListof Display objects or an empty array if none are present.
-
getNetworkIFs
Description copied from interface:HardwareAbstractionLayerGets a list ofNetworkIFobjects, representing a network interface- Returns:
- An
UnmodifiableListofNetworkIFobjects representing the interfaces
-
getUsbDevices
Description copied from interface:HardwareAbstractionLayerInstantiates anUnmodifiableListofUsbDeviceobjects, representing devices connected via a usb port (including internal devices).If the value of
treeis 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 oftreeis false, USB devices (not controllers) are listed in a single flat list.- Parameters:
tree- Iftrue, returns devices connected to the existing device, accessible viaUsbDevice.getConnectedDevices(). Iffalsereturns devices as a flat list with no connected device information.- Returns:
- An
UnmodifiableListof 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:HardwareAbstractionLayerInstantiates anUnmodifiableListofSoundCardobjects, representing the Sound cards.- Returns:
- An
UnmodifiableListof SoundCard objects or an empty array if none are present.
-
getGraphicsCards
Description copied from interface:HardwareAbstractionLayerInstantiates anUnmodifiableListofGraphicsCardobjects, representing the Graphics cards.- Returns:
- An
UnmodifiableListof objects or an empty array if none are present.
-