Interface ContextChainMastershipWatcher
- All Known Subinterfaces:
ContextChainHolder
- All Known Implementing Classes:
ContextChainHolderImpl
public interface ContextChainMastershipWatcher
Watcher if able to start mastership for device.
- Since:
- 0.4.0 Carbon
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onMasterRoleAcquired
(DeviceInfo deviceInfo, @NonNull ContextChainMastershipState mastershipState) Changed to MASTER role on device.void
onNotAbleToStartMastership
(DeviceInfo deviceInfo, String reason, boolean mandatory) Event occurs if there was a try to acquire MASTER role.default void
onNotAbleToStartMastershipMandatory
(DeviceInfo deviceInfo, String reason) Event occurs if there was a try to acquire MASTER role.void
onSlaveRoleAcquired
(DeviceInfo deviceInfo) Change to SLAVE role on device was successful.void
onSlaveRoleNotAcquired
(DeviceInfo deviceInfo, String reason) Change to SLAVE role on device was not able.
-
Method Details
-
onNotAbleToStartMastership
Event occurs if there was a try to acquire MASTER role. But it was not possible to start this MASTER role on device.- Parameters:
deviceInfo
- connected switch identificationreason
- reasonmandatory
- if it is mandatory connection will be dropped
-
onNotAbleToStartMastershipMandatory
Event occurs if there was a try to acquire MASTER role. But it was not possible to start this MASTER role on device.- Parameters:
deviceInfo
- connected switch identificationreason
- reason
-
onMasterRoleAcquired
void onMasterRoleAcquired(DeviceInfo deviceInfo, @NonNull ContextChainMastershipState mastershipState) Changed to MASTER role on device.- Parameters:
deviceInfo
- connected switch identificationmastershipState
- state
-
onSlaveRoleAcquired
Change to SLAVE role on device was successful.- Parameters:
deviceInfo
- connected switch identification
-
onSlaveRoleNotAcquired
Change to SLAVE role on device was not able.- Parameters:
deviceInfo
- connected switch identificationreason
- reason
-