Interface MastershipChangeService
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DeviceMastershipManager,MastershipServiceDelegate
This service is for registering any application intent to be informed about device mastership changes.
Service provides three events.
onBecomeOwner(DeviceInfo)is called when device is fully mastered by controlleronLoseOwnership(DeviceInfo)is called when device is disconnected or is being to be slave
- Since:
- 0.5.0 Nitrogen
-
Method Summary
Modifier and TypeMethodDescriptionvoidonBecomeOwner(@NonNull DeviceInfo deviceInfo) Event when device is ready as a master.voidonLoseOwnership(@NonNull DeviceInfo deviceInfo) Event when device disconnected or become slave.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
onBecomeOwner
Event when device is ready as a master. This event is evoked byOwnershipChangeListener.becomeMaster(DeviceInfo)- Parameters:
deviceInfo- connected switch identification
-
onLoseOwnership
Event when device disconnected or become slave. This event is evoked byOwnershipChangeListener.becomeSlaveOrDisconnect(DeviceInfo)- Parameters:
deviceInfo- connected switch identification
-