Package com.tccc.kos.core.service.udev
Interface UdevDeviceAvailabilityListener
- All Superinterfaces:
UdevDeviceListener
Listener interface to listen to device availability. Devices can
be owned by different components while they exist and this listener
is used to detect when they are claimed or become available again
after being released.
- Version:
- 2023-09-18
-
Method Summary
Modifier and TypeMethodDescriptionvoidonDeviceAvailable(UdevService service, UdevDevice device) Called when a device is available.voidonDeviceUnavailable(UdevService service, UdevDevice device) Called when aUdevDeviceis claimed.
-
Method Details
-
onDeviceAvailable
Called when a device is available. This is called after a device has been added as well as when a previously owned device is released. The callback can claim exclusive use of the device by callingUdevService.claimDevice()and release it by callingUdevService.removeOwner()orUdevService.releaseDevice().- Parameters:
service- theUdevServicedevice- the available
-