Class AbstractHardwareAbstractionLayer
java.lang.Object
oshi.hardware.common.AbstractHardwareAbstractionLayer
- All Implemented Interfaces:
HardwareAbstractionLayer
- Direct Known Subclasses:
LinuxHardwareAbstractionLayer, MacHardwareAbstractionLayer, NetBsdHardwareAbstractionLayer
@ThreadSafe
public abstract class AbstractHardwareAbstractionLayer
extends Object
implements HardwareAbstractionLayer
Common fields or methods used by platform-specific implementations of HardwareAbstractionLayer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ComputerSystemInstantiates the platform-specificComputerSystemobjectprotected abstract GlobalMemoryInstantiates the platform-specificGlobalMemoryobjectprotected abstract CentralProcessorInstantiates the platform-specificCentralProcessorobjectprotected abstract SensorsInstantiates the platform-specificSensorsobjectInstantiates aComputerSystemobject.Instantiates aGlobalMemoryobject.Gets a list of non-localNetworkIFobjects, representing a network interface.Instantiates aCentralProcessorobject.Instantiates aSensorsobject, representing CPU temperature and fan speed.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HardwareAbstractionLayer
getBluetoothDevices, getDiskStores, getDisplays, getGraphicsCards, getLogicalVolumeGroups, getNetworkIFs, getPowerSources, getPrinters, getSoundCards, getUsbDevicesModifier and TypeMethodDescriptiondefault List<BluetoothDevice> Instantiates a list ofBluetoothDeviceobjects, representing Bluetooth devices (paired or connected) known to the system.Instantiates a list ofHWDiskStoreobjects, representing physical hard disks or other similar storage devices.Instantiates a list ofDisplayobjects, representing monitors or other video output devices.Instantiates a list ofGraphicsCardobjects, representing the Graphics cards.default List<LogicalVolumeGroup> Instantiates a list ofLogicalVolumeGroupobjects, representing a storage pool or group of devices, partitions, volumes, or other implementation specific means of file storage.getNetworkIFs(boolean includeLocalInterfaces) Gets a listNetworkIFobjects, representing a network interface.Instantiates a list ofPowerSourceobjects, representing batteries, etc.Instantiates a list ofPrinterobjects, representing printers.Instantiates a list ofSoundCardobjects, representing the Sound cards.getUsbDevices(boolean tree) Instantiates a list ofUsbDeviceobjects, representing devices connected via a usb port (including internal devices).
-
Constructor Details
-
AbstractHardwareAbstractionLayer
protected AbstractHardwareAbstractionLayer()Default constructor.
-
-
Method Details
-
getComputerSystem
Description copied from interface:HardwareAbstractionLayerInstantiates aComputerSystemobject. This represents the physical hardware, including components such as BIOS/Firmware and a motherboard, logic board, etc.- Specified by:
getComputerSystemin interfaceHardwareAbstractionLayer- Returns:
- a
ComputerSystemobject.
-
createComputerSystem
Instantiates the platform-specificComputerSystemobject- Returns:
- platform-specific
ComputerSystemobject
-
getProcessor
Description copied from interface:HardwareAbstractionLayerInstantiates aCentralProcessorobject. This represents one or more Logical CPUs.- Specified by:
getProcessorin interfaceHardwareAbstractionLayer- Returns:
- A
CentralProcessorobject.
-
createProcessor
Instantiates the platform-specificCentralProcessorobject- Returns:
- platform-specific
CentralProcessorobject
-
getMemory
Description copied from interface:HardwareAbstractionLayerInstantiates aGlobalMemoryobject.- Specified by:
getMemoryin interfaceHardwareAbstractionLayer- Returns:
- A memory object.
-
createMemory
Instantiates the platform-specificGlobalMemoryobject- Returns:
- platform-specific
GlobalMemoryobject
-
getSensors
Description copied from interface:HardwareAbstractionLayerInstantiates aSensorsobject, representing CPU temperature and fan speed.- Specified by:
getSensorsin interfaceHardwareAbstractionLayer- Returns:
- A Sensors object
-
createSensors
-
getNetworkIFs
Description copied from interface:HardwareAbstractionLayerGets a list of non-localNetworkIFobjects, representing a network interface. The list excludes local interfaces.- Specified by:
getNetworkIFsin interfaceHardwareAbstractionLayer- Returns:
- A list of
NetworkIFobjects representing the interfaces
-