Package oshi.hardware.common
Class AbstractHardwareAbstractionLayer
- java.lang.Object
-
- oshi.hardware.common.AbstractHardwareAbstractionLayer
-
- All Implemented Interfaces:
HardwareAbstractionLayer
- Direct Known Subclasses:
AixHardwareAbstractionLayer,FreeBsdHardwareAbstractionLayer,LinuxHardwareAbstractionLayer,MacHardwareAbstractionLayer,OpenBsdHardwareAbstractionLayer,SolarisHardwareAbstractionLayer,WindowsHardwareAbstractionLayer
@ThreadSafe public abstract class AbstractHardwareAbstractionLayer extends java.lang.Object implements HardwareAbstractionLayer
Common fields or methods used by platform-specific implementations of HardwareAbstractionLayer
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Supplier<ComputerSystem>computerSystemprivate java.util.function.Supplier<GlobalMemory>memoryprivate java.util.function.Supplier<CentralProcessor>processorprivate java.util.function.Supplier<Sensors>sensors
-
Constructor Summary
Constructors Constructor Description AbstractHardwareAbstractionLayer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ComputerSystemcreateComputerSystem()Instantiates the platform-specificComputerSystemobjectprotected abstract GlobalMemorycreateMemory()Instantiates the platform-specificGlobalMemoryobjectprotected abstract CentralProcessorcreateProcessor()Instantiates the platform-specificCentralProcessorobjectprotected abstract SensorscreateSensors()Instantiates the platform-specificSensorsobjectComputerSystemgetComputerSystem()Instantiates aComputerSystemobject.GlobalMemorygetMemory()Instantiates aGlobalMemoryobject.java.util.List<NetworkIF>getNetworkIFs()Gets a list of non-localNetworkIFobjects, representing a network interface.CentralProcessorgetProcessor()Instantiates aCentralProcessorobject.SensorsgetSensors()Instantiates aSensorsobject, representing CPU temperature and fan speed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface oshi.hardware.HardwareAbstractionLayer
getDiskStores, getDisplays, getGraphicsCards, getLogicalVolumeGroups, getNetworkIFs, getPowerSources, getSoundCards, getUsbDevices
-
-
-
-
Field Detail
-
computerSystem
private final java.util.function.Supplier<ComputerSystem> computerSystem
-
processor
private final java.util.function.Supplier<CentralProcessor> processor
-
memory
private final java.util.function.Supplier<GlobalMemory> memory
-
sensors
private final java.util.function.Supplier<Sensors> sensors
-
-
Method Detail
-
getComputerSystem
public ComputerSystem 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
protected abstract ComputerSystem createComputerSystem()
Instantiates the platform-specificComputerSystemobject- Returns:
- platform-specific
ComputerSystemobject
-
getProcessor
public CentralProcessor getProcessor()
Description copied from interface:HardwareAbstractionLayerInstantiates aCentralProcessorobject. This represents one or more Logical CPUs.- Specified by:
getProcessorin interfaceHardwareAbstractionLayer- Returns:
- A
CentralProcessorobject.
-
createProcessor
protected abstract CentralProcessor createProcessor()
Instantiates the platform-specificCentralProcessorobject- Returns:
- platform-specific
CentralProcessorobject
-
getMemory
public GlobalMemory getMemory()
Description copied from interface:HardwareAbstractionLayerInstantiates aGlobalMemoryobject.- Specified by:
getMemoryin interfaceHardwareAbstractionLayer- Returns:
- A memory object.
-
createMemory
protected abstract GlobalMemory createMemory()
Instantiates the platform-specificGlobalMemoryobject- Returns:
- platform-specific
GlobalMemoryobject
-
getSensors
public Sensors getSensors()
Description copied from interface:HardwareAbstractionLayerInstantiates aSensorsobject, representing CPU temperature and fan speed.- Specified by:
getSensorsin interfaceHardwareAbstractionLayer- Returns:
- A Sensors object
-
createSensors
protected abstract Sensors createSensors()
Instantiates the platform-specificSensorsobject- Returns:
- platform-specific
Sensorsobject
-
getNetworkIFs
public java.util.List<NetworkIF> 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
-
-