Package software.amazon.awssdk.crt.mqtt5
Interface Mqtt5ClientOptions.LifecycleEvents
-
- Enclosing class:
- Mqtt5ClientOptions
public static interface Mqtt5ClientOptions.LifecycleEvents
An interface that defines all of the functions the Mqtt5Client will call when it receives a lifecycle event.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onAttemptingConnect(Mqtt5Client client, OnAttemptingConnectReturn onAttemptingConnectReturn)
Called when the client begins a connection attemptvoid
onConnectionFailure(Mqtt5Client client, OnConnectionFailureReturn onConnectionFailureReturn)
Called when the client fails to establish an MQTT connectionvoid
onConnectionSuccess(Mqtt5Client client, OnConnectionSuccessReturn onConnectionSuccessReturn)
Called when the client successfully establishes an MQTT connectionvoid
onDisconnection(Mqtt5Client client, OnDisconnectionReturn onDisconnectionReturn)
Called when the client's current MQTT connection is closedvoid
onStopped(Mqtt5Client client, OnStoppedReturn onStoppedReturn)
Called when the client reaches the 'Stopped' state as a result of the user invoking .stop()
-
-
-
Method Detail
-
onAttemptingConnect
void onAttemptingConnect(Mqtt5Client client, OnAttemptingConnectReturn onAttemptingConnectReturn)
Called when the client begins a connection attempt- Parameters:
client
- The client associated with the eventonAttemptingConnectReturn
- The data associated with the onAttemptingConnect event.
-
onConnectionSuccess
void onConnectionSuccess(Mqtt5Client client, OnConnectionSuccessReturn onConnectionSuccessReturn)
Called when the client successfully establishes an MQTT connection- Parameters:
client
- The client associated with the eventonConnectionSuccessReturn
- The data associated with the onConnectionSuccess event.
-
onConnectionFailure
void onConnectionFailure(Mqtt5Client client, OnConnectionFailureReturn onConnectionFailureReturn)
Called when the client fails to establish an MQTT connection- Parameters:
client
- The client associated with the eventonConnectionFailureReturn
- The data associated with the onConnectionFailure event.
-
onDisconnection
void onDisconnection(Mqtt5Client client, OnDisconnectionReturn onDisconnectionReturn)
Called when the client's current MQTT connection is closed- Parameters:
client
- The client associated with the eventonDisconnectionReturn
- The data associated with the onDisconnection event.
-
onStopped
void onStopped(Mqtt5Client client, OnStoppedReturn onStoppedReturn)
Called when the client reaches the 'Stopped' state as a result of the user invoking .stop()- Parameters:
client
- The client associated with the eventonStoppedReturn
- The data associated with the onStopped event.
-
-