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 ComputerSystemgetComputerSystem()Instantiates aComputerSystemobject.java.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.GlobalMemorygetMemory()Instantiates aGlobalMemoryobject.java.util.List<NetworkIF>getNetworkIFs()Gets a list ofNetworkIFobjects, representing a network interfacejava.util.List<PowerSource>getPowerSources()Instantiates anUnmodifiableListofPowerSourceobjects, representing batteries, etc.CentralProcessorgetProcessor()Instantiates aCentralProcessorobject.SensorsgetSensors()Instantiates aSensorsobject, representing CPU temperature and fan speedjava.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).
-
Method Details
-
getComputerSystem
ComputerSystem getComputerSystem()Instantiates aComputerSystemobject. This represents the physical hardware, including components such as BIOS/Firmware and a motherboard, logic board, etc.- Returns:
- a
ComputerSystemobject.
-
getProcessor
CentralProcessor getProcessor()Instantiates aCentralProcessorobject. This represents one or more Logical CPUs.- Returns:
- A
CentralProcessorobject.
-
getMemory
GlobalMemory getMemory()Instantiates aGlobalMemoryobject.- Returns:
- A memory object.
-
getPowerSources
java.util.List<PowerSource> getPowerSources()Instantiates anUnmodifiableListofPowerSourceobjects, representing batteries, etc.- Returns:
- An
UnmodifiableListof PowerSource objects or an empty array if none are present.
-
getDiskStores
java.util.List<HWDiskStore> getDiskStores()Instantiates anUnmodifiableListofHWDiskStoreobjects, representing physical hard disks or other similar storage devices- Returns:
- An
UnmodifiableListof HWDiskStore objects or an empty list if none are present.
-
getNetworkIFs
java.util.List<NetworkIF> getNetworkIFs()Gets a list ofNetworkIFobjects, representing a network interface- Returns:
- An
UnmodifiableListofNetworkIFobjects representing the interfaces
-
getDisplays
java.util.List<Display> getDisplays()Instantiates anUnmodifiableListofDisplayobjects, representing monitors or other video output devices.- Returns:
- An
UnmodifiableListof Display objects or an empty array if none are present.
-
getSensors
Sensors getSensors()Instantiates aSensorsobject, representing CPU temperature and fan speed- Returns:
- A Sensors object
-
getUsbDevices
Instantiates 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
java.util.List<SoundCard> getSoundCards()Instantiates anUnmodifiableListofSoundCardobjects, representing the Sound cards.- Returns:
- An
UnmodifiableListof SoundCard objects or an empty array if none are present.
-
getGraphicsCards
java.util.List<GraphicsCard> getGraphicsCards()Instantiates anUnmodifiableListofGraphicsCardobjects, representing the Graphics cards.- Returns:
- An
UnmodifiableListof objects or an empty array if none are present.
-