View Javadoc
1   /*
2    * Copyright 2021-2022 The OSHI Project Contributors
3    * SPDX-License-Identifier: MIT
4    */
5   package oshi.hardware.platform.unix.openbsd;
6   
7   import java.util.List;
8   
9   import oshi.annotation.concurrent.ThreadSafe;
10  import oshi.hardware.CentralProcessor;
11  import oshi.hardware.ComputerSystem;
12  import oshi.hardware.Display;
13  import oshi.hardware.GlobalMemory;
14  import oshi.hardware.GraphicsCard;
15  import oshi.hardware.HWDiskStore;
16  import oshi.hardware.NetworkIF;
17  import oshi.hardware.PowerSource;
18  import oshi.hardware.Sensors;
19  import oshi.hardware.SoundCard;
20  import oshi.hardware.UsbDevice;
21  import oshi.hardware.common.AbstractHardwareAbstractionLayer;
22  import oshi.hardware.platform.unix.BsdNetworkIF;
23  import oshi.hardware.platform.unix.UnixDisplay;
24  
25  /**
26   * OpenBsdHardwareAbstractionLayer class.
27   */
28  @ThreadSafe
29  public final class OpenBsdHardwareAbstractionLayer extends AbstractHardwareAbstractionLayer {
30  
31      @Override
32      public ComputerSystem createComputerSystem() {
33          return new OpenBsdComputerSystem();
34      }
35  
36      @Override
37      public GlobalMemory createMemory() {
38          return new OpenBsdGlobalMemory();
39      }
40  
41      @Override
42      public CentralProcessor createProcessor() {
43          return new OpenBsdCentralProcessor();
44      }
45  
46      @Override
47      public Sensors createSensors() {
48          return new OpenBsdSensors();
49      }
50  
51      @Override
52      public List<PowerSource> getPowerSources() {
53          return OpenBsdPowerSource.getPowerSources();
54      }
55  
56      @Override
57      public List<HWDiskStore> getDiskStores() {
58          return OpenBsdHWDiskStore.getDisks();
59      }
60  
61      @Override
62      public List<Display> getDisplays() {
63          return UnixDisplay.getDisplays();
64      }
65  
66      @Override
67      public List<NetworkIF> getNetworkIFs(boolean includeLocalInterfaces) {
68          return BsdNetworkIF.getNetworks(includeLocalInterfaces);
69      }
70  
71      @Override
72      public List<UsbDevice> getUsbDevices(boolean tree) {
73          return OpenBsdUsbDevice.getUsbDevices(tree);
74      }
75  
76      @Override
77      public List<SoundCard> getSoundCards() {
78          return OpenBsdSoundCard.getSoundCards();
79      }
80  
81      @Override
82      public List<GraphicsCard> getGraphicsCards() {
83          return OpenBsdGraphicsCard.getGraphicsCards();
84      }
85  }