Class DeviceServer

java.lang.Object
com.kosdev.kos.core.service.device.DeviceService
com.kosdev.kos.core.service.device.server.DeviceServer

public class DeviceServer extends DeviceService
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 Details

    • DeviceServer

      public DeviceServer()
  • Method Details

    • setDeviceType

      public void setDeviceType(String deviceType)
      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/deviceType early 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