Interface MastershipChangeService
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DeviceMastershipManager
,MastershipServiceDelegate
public interface MastershipChangeService extends AutoCloseable
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onBecomeOwner(@NonNull DeviceInfo deviceInfo)
Event when device is ready as a master.void
onLoseOwnership(@NonNull DeviceInfo deviceInfo)
Event when device disconnected or become slave.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
onBecomeOwner
void onBecomeOwner(@NonNull DeviceInfo deviceInfo)
Event when device is ready as a master. This event is evoked byOwnershipChangeListener.becomeMaster(DeviceInfo)
- Parameters:
deviceInfo
- connected switch identification
-
onLoseOwnership
void onLoseOwnership(@NonNull DeviceInfo deviceInfo)
Event when device disconnected or become slave. This event is evoked byOwnershipChangeListener.becomeSlaveOrDisconnect(DeviceInfo)
- Parameters:
deviceInfo
- connected switch identification
-
-