Interface SerialNumberProvider

All Superinterfaces:
Ready
All Known Implementing Classes:
ConfigSerialNumberProvider, CriticalDataSerialNumberProvider, RunKosSerialNumberProvider

public interface SerialNumberProvider extends Ready
Interface for fetching and storing a device serial number. This interface is a bit complex in that some implementations don't have access to serial number information immediately. This means that getting/setting the serial number will fail until the provider is fully ready for use. For example, a serial number stored using CriticalDataService isn't accessible until enough hardware boots such that critical data can be established.

To indicate that the provider is ready for use, this interface extends Ready. The provider must set itself ready before it will be used.

The provider should not become ready if there is not a serial number. This interface is designed to indicate to downstream processes that a valid serial number exists and is accurate. A null serial number is not a serial number and consumers of the serial number are typically not designed to handle null as they require a valid serial number to function properly. In the event no serial number is available, the provider should never become ready.

Since:
1.0
Version:
2024-06-24
  • Method Details

    • getSerialNumber

      String getSerialNumber() throws Exception
      Return the serial number of the device.
      Throws:
      Exception
    • setSerialNumber

      void setSerialNumber(String serialNumber) throws Exception
      Set the serial number of the device.
      Parameters:
      serialNumber - the new device serial number
      Throws:
      Exception