com.google.android.things.iotcore
Class ConnectionCallback
- java.lang.Object
-
- com.google.android.things.iotcore.ConnectionCallback
-
public abstract class ConnectionCallback extends Object
Callback interface to receive information about the status of the Cloud IoT Core connection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interface
ConnectionCallback.DisconnectReason
Disconnect reason codes.
-
Field Summary
Fields Modifier and Type Field and Description static int
REASON_CLIENT_CLOSED
The client closed the connection.static int
REASON_CONNECTION_LOST
The device lost connection to Cloud IoT Core.static int
REASON_CONNECTION_TIMEOUT
Timeout occurred while connecting to the MQTT bridge.static int
REASON_NOT_AUTHORIZED
The parameters used to connect to Cloud IoT Core were invalid.static int
REASON_UNKNOWN
Could not determine the source of the error.
-
Constructor Summary
Constructors Constructor and Description ConnectionCallback()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description abstract void
onConnected()
Invoked when the Cloud IoT Core connection is established.abstract void
onDisconnected(int reason)
Invoked when the Cloud IoT Core connection is lost.
-
-
-
Field Detail
-
REASON_UNKNOWN
public static final int REASON_UNKNOWN
Could not determine the source of the error.- See Also:
- Constant Field Values
-
REASON_NOT_AUTHORIZED
public static final int REASON_NOT_AUTHORIZED
The parameters used to connect to Cloud IoT Core were invalid.- See Also:
- Constant Field Values
-
REASON_CONNECTION_LOST
public static final int REASON_CONNECTION_LOST
The device lost connection to Cloud IoT Core.- See Also:
- Constant Field Values
-
REASON_CONNECTION_TIMEOUT
public static final int REASON_CONNECTION_TIMEOUT
Timeout occurred while connecting to the MQTT bridge.- See Also:
- Constant Field Values
-
REASON_CLIENT_CLOSED
public static final int REASON_CLIENT_CLOSED
The client closed the connection.- See Also:
- Constant Field Values
-
-