Class DeviceServer
java.lang.Object
com.kosdev.kos.core.service.device.DeviceService
com.kosdev.kos.core.service.device.server.DeviceServer
Implementation of
DeviceService that runs on the primary node. This contains
methods that can only be called on the primary node. Generally speaking, device-wide
information such as serial number and device type are automatically replicated to
secondary nodes so the entire device has a consistent view of this information.- Since:
- 10
- Version:
- 10
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetDeviceType(String deviceType) Set the device type for the entire device.Methods inherited from class com.kosdev.kos.core.service.device.DeviceService
getDevice, getDeviceType, getSerialNumber, getSerialNumberProvider, notifyListeners, setDevice, setSerialNumber, setSerialNumberProvider
-
Constructor Details
-
DeviceServer
public DeviceServer()
-
-
Method Details
-
setDeviceType
Set the device type for the entire device. By default the device type is the nodeType of the primary node. This can be overridden by setting/run/kos/deviceTypeearly in the boot process before java starts. Otherwise, this method can be used.This method can only be called before the system app reaches the post started state, meaning that the
started()has returned. Once it reaches this state, calls to this method will throw an exception.- Parameters:
deviceType- the new deviceType- Since:
- 10
-