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 Details

    • LinuxHardwareAbstractionLayer

      public LinuxHardwareAbstractionLayer()
  • Method Details

    • createComputerSystem

      public ComputerSystem createComputerSystem()
      Description copied from class: AbstractHardwareAbstractionLayer
      Instantiates the platform-specific ComputerSystem object
      Specified by:
      createComputerSystem in class AbstractHardwareAbstractionLayer
      Returns:
      platform-specific ComputerSystem object
    • createMemory

      public GlobalMemory createMemory()
      Description copied from class: AbstractHardwareAbstractionLayer
      Instantiates the platform-specific GlobalMemory object
      Specified by:
      createMemory in class AbstractHardwareAbstractionLayer
      Returns:
      platform-specific GlobalMemory object
    • createProcessor

      public CentralProcessor createProcessor()
      Description copied from class: AbstractHardwareAbstractionLayer
      Instantiates the platform-specific CentralProcessor object
      Specified by:
      createProcessor in class AbstractHardwareAbstractionLayer
      Returns:
      platform-specific CentralProcessor object
    • createSensors

      public Sensors createSensors()
      Description copied from class: AbstractHardwareAbstractionLayer
      Instantiates the platform-specific Sensors object
      Specified by:
      createSensors in class AbstractHardwareAbstractionLayer
      Returns:
      platform-specific Sensors object
    • getPowerSources

      public java.util.List<PowerSource> getPowerSources()
      Description copied from interface: HardwareAbstractionLayer
      Instantiates an UnmodifiableList of PowerSource objects, representing batteries, etc.
      Returns:
      An UnmodifiableList of PowerSource objects or an empty array if none are present.
    • getDiskStores

      public java.util.List<HWDiskStore> getDiskStores()
      Description copied from interface: HardwareAbstractionLayer
      Instantiates an UnmodifiableList of HWDiskStore objects, representing physical hard disks or other similar storage devices.
      Returns:
      An UnmodifiableList of HWDiskStore objects or an empty list if none are present.
    • getDisplays

      public java.util.List<Display> getDisplays()
      Description copied from interface: HardwareAbstractionLayer
      Instantiates an UnmodifiableList of Display objects, representing monitors or other video output devices.
      Returns:
      An UnmodifiableList of Display objects or an empty array if none are present.
    • getNetworkIFs

      public java.util.List<NetworkIF> getNetworkIFs​(boolean includeLocalInterfaces)
      Description copied from interface: HardwareAbstractionLayer
      Gets a list NetworkIF objects, representing a network interface.
      Parameters:
      includeLocalInterfaces - whether to include local interfaces (loopback or no hardware address) in the result
      Returns:
      An UnmodifiableList of NetworkIF objects representing the interfaces
    • getUsbDevices

      public java.util.List<UsbDevice> getUsbDevices​(boolean tree)
      Description copied from interface: HardwareAbstractionLayer
      Instantiates an UnmodifiableList of UsbDevice 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 list.

      Parameters:
      tree - If true, returns devices connected to the existing device, accessible via UsbDevice.getConnectedDevices(). If false returns devices as a flat list with no connected device information.
      Returns:
      An UnmodifiableList of UsbDevice objects representing (optionally) the USB Controllers and devices connected to them, or an empty array if none are present
    • getSoundCards

      public java.util.List<SoundCard> getSoundCards()
      Description copied from interface: HardwareAbstractionLayer
      Instantiates an UnmodifiableList of SoundCard objects, representing the Sound cards.
      Returns:
      An UnmodifiableList of SoundCard objects or an empty array if none are present.
    • getGraphicsCards

      public java.util.List<GraphicsCard> getGraphicsCards()
      Description copied from interface: HardwareAbstractionLayer
      Instantiates an UnmodifiableList of GraphicsCard objects, representing the Graphics cards.
      Returns:
      An UnmodifiableList of objects or an empty array if none are present.