Interface MastershipChangeService
- All Known Implementing Classes:
DeviceMastershipManager
,MastershipServiceDelegate
public interface MastershipChangeService
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 TypeMethodDescriptionvoid
onBecomeOwner
(@NonNull DeviceInfo deviceInfo) Event when device is ready as a master.void
onLoseOwnership
(@NonNull DeviceInfo deviceInfo) Event when device disconnected or become slave.
-
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
-