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 Details

    • onNotAbleToStartMastership

      void onNotAbleToStartMastership(DeviceInfo deviceInfo, String reason, boolean mandatory)
      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 identification
      reason - reason
      mandatory - if it is mandatory connection will be dropped
    • onNotAbleToStartMastershipMandatory

      default void onNotAbleToStartMastershipMandatory(DeviceInfo deviceInfo, String reason)
      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 identification
      reason - reason
    • onMasterRoleAcquired

      void onMasterRoleAcquired(DeviceInfo deviceInfo, @NonNull ContextChainMastershipState mastershipState)
      Changed to MASTER role on device.
      Parameters:
      deviceInfo - connected switch identification
      mastershipState - state
    • onSlaveRoleAcquired

      void onSlaveRoleAcquired(DeviceInfo deviceInfo)
      Change to SLAVE role on device was successful.
      Parameters:
      deviceInfo - connected switch identification
    • onSlaveRoleNotAcquired

      void onSlaveRoleNotAcquired(DeviceInfo deviceInfo, String reason)
      Change to SLAVE role on device was not able.
      Parameters:
      deviceInfo - connected switch identification
      reason - reason