Package software.amazon.awssdk.crt.mqtt
Interface MqttClientConnectionEvents
-
public interface MqttClientConnectionEventsInterface used to receive connection events from the CRT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonConnectionInterrupted(int errorCode)connection was lost (or disconnected), reconnect will be attempted automatically until disconnect() is calledvoidonConnectionResumed(boolean sessionPresent)called whenever a reconnect succeeds; not called on an initial connect success
-
-
-
Method Detail
-
onConnectionInterrupted
void onConnectionInterrupted(int errorCode)
connection was lost (or disconnected), reconnect will be attempted automatically until disconnect() is called- Parameters:
errorCode- AWS CRT error code, pass toCRT.awsErrorString(int)for a human readable error
-
onConnectionResumed
void onConnectionResumed(boolean sessionPresent)
called whenever a reconnect succeeds; not called on an initial connect success- Parameters:
sessionPresent- true if the session has been resumed, false if the session is clean
-
-