Package oshi.hardware
Interface HardwareAbstractionLayer
- All Known Implementing Classes:
AbstractHardwareAbstractionLayer
,AixHardwareAbstractionLayer
,FreeBsdHardwareAbstractionLayer
,LinuxHardwareAbstractionLayer
,MacHardwareAbstractionLayer
,SolarisHardwareAbstractionLayer
,WindowsHardwareAbstractionLayer
@ThreadSafe public interface HardwareAbstractionLayer
A hardware abstraction layer. Provides access to hardware items such as
processors, memory, battery, and disks.
-
Method Summary
Modifier and Type Method Description ComputerSystem
getComputerSystem()
Instantiates aComputerSystem
object.java.util.List<HWDiskStore>
getDiskStores()
Instantiates anUnmodifiableList
ofHWDiskStore
objects, representing physical hard disks or other similar storage devicesjava.util.List<Display>
getDisplays()
Instantiates anUnmodifiableList
ofDisplay
objects, representing monitors or other video output devices.java.util.List<GraphicsCard>
getGraphicsCards()
Instantiates anUnmodifiableList
ofGraphicsCard
objects, representing the Graphics cards.GlobalMemory
getMemory()
Instantiates aGlobalMemory
object.java.util.List<NetworkIF>
getNetworkIFs()
Gets a list ofNetworkIF
objects, representing a network interfacejava.util.List<PowerSource>
getPowerSources()
Instantiates anUnmodifiableList
ofPowerSource
objects, representing batteries, etc.CentralProcessor
getProcessor()
Instantiates aCentralProcessor
object.Sensors
getSensors()
Instantiates aSensors
object, representing CPU temperature and fan speedjava.util.List<SoundCard>
getSoundCards()
Instantiates anUnmodifiableList
ofSoundCard
objects, representing the Sound cards.java.util.List<UsbDevice>
getUsbDevices(boolean tree)
Instantiates anUnmodifiableList
ofUsbDevice
objects, representing devices connected via a usb port (including internal devices).
-
Method Details
-
getComputerSystem
ComputerSystem getComputerSystem()Instantiates aComputerSystem
object. This represents the physical hardware, including components such as BIOS/Firmware and a motherboard, logic board, etc.- Returns:
- a
ComputerSystem
object.
-
getProcessor
CentralProcessor getProcessor()Instantiates aCentralProcessor
object. This represents one or more Logical CPUs.- Returns:
- A
CentralProcessor
object.
-
getMemory
GlobalMemory getMemory()Instantiates aGlobalMemory
object.- Returns:
- A memory object.
-
getPowerSources
java.util.List<PowerSource> getPowerSources()Instantiates anUnmodifiableList
ofPowerSource
objects, representing batteries, etc.- Returns:
- An
UnmodifiableList
of PowerSource objects or an empty array if none are present.
-
getDiskStores
java.util.List<HWDiskStore> getDiskStores()Instantiates anUnmodifiableList
ofHWDiskStore
objects, representing physical hard disks or other similar storage devices- Returns:
- An
UnmodifiableList
of HWDiskStore objects or an empty list if none are present.
-
getNetworkIFs
java.util.List<NetworkIF> getNetworkIFs()Gets a list ofNetworkIF
objects, representing a network interface- Returns:
- An
UnmodifiableList
ofNetworkIF
objects representing the interfaces
-
getDisplays
java.util.List<Display> getDisplays()Instantiates anUnmodifiableList
ofDisplay
objects, representing monitors or other video output devices.- Returns:
- An
UnmodifiableList
of Display objects or an empty array if none are present.
-
getSensors
Sensors getSensors()Instantiates aSensors
object, representing CPU temperature and fan speed- Returns:
- A Sensors object
-
getUsbDevices
Instantiates anUnmodifiableList
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 oftree
is 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()
. Iffalse
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
java.util.List<SoundCard> getSoundCards()Instantiates anUnmodifiableList
ofSoundCard
objects, representing the Sound cards.- Returns:
- An
UnmodifiableList
of SoundCard objects or an empty array if none are present.
-
getGraphicsCards
java.util.List<GraphicsCard> getGraphicsCards()Instantiates anUnmodifiableList
ofGraphicsCard
objects, representing the Graphics cards.- Returns:
- An
UnmodifiableList
of objects or an empty array if none are present.
-