Package com.kosdev.kos.core.service.device.serialnum
package com.kosdev.kos.core.service.device.serialnum
Serial number management services for KOS devices.
This package provides a flexible framework for managing device serial numbers with support
for various storage backends and asynchronous readiness patterns. Serial number providers
extend ReadyBean to handle scenarios where serial number access may be delayed
due to hardware initialization or data availability constraints.
Core API Components:
SerialNumberProvider- Interface for serial number accessSerialNumberListener- Notification interface for serial number changesSerialNumberException- Base exception for serial number operations
Provider Implementations:
ConfigSerialNumberProvider- Configuration-based storage (testing only)CriticalDataSerialNumberProvider- Hardware-persistent critical data storageRunKosSerialNumberProvider- File-based read-only provider
Provider Selection Guidelines:
- Production Systems: Use
CriticalDataSerialNumberProviderfor hardware-persistent storage that survives board swaps - Testing/Development: Use
ConfigSerialNumberProviderfor configuration-based serial numbers - Read-Only Systems: Use
RunKosSerialNumberProviderwhen serial numbers are externally programmed and available via filesystem
The framework ensures that only valid, non-null serial numbers are exposed to consuming systems, maintaining data integrity across device restarts and hardware changes.
- Since:
- 1
- See Also:
-
ClassDescriptionBase exception for serial number related exceptions.Listener for when the serial number is set.Interface for fetching and storing a device serial number.