Created
August 27, 2021 07:57
-
-
Save deepanshu42/f816675ea143cca9b651f86df9274add to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val eventHandler = object : EventHandler { | |
override fun onEvent(mqttEvent: MqttEvent) { | |
when (mqttEvent) { | |
is MqttConnectSuccessEvent -> { | |
// handle MqttConnectSuccessEvent | |
} | |
is MqttConnectFailureEvent -> { | |
// handle MqttConnectFailureEvent | |
} | |
is MqttSubscribeSuccessEvent -> { | |
// handle MqttSubscribeSuccessEvent | |
} | |
else -> { | |
// handle other events | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment