IotHubConnectionStatusChangeReason 枚举

定义

public enum IotHubConnectionStatusChangeReason
继承
java.lang.Object
java.lang.Enum<IotHubConnectionStatusChangeReason>
IotHubConnectionStatusChangeReason

字段

BAD_CREDENTIAL

Incorrect credentials were supplied to the client instance. The supplied credentials need to be fixed before a connection can be established.

This is returned with a connection status of DISCONNECTED.

CLIENT_CLOSE

The client has been closed gracefully.

This is returned with a connection status of DISCONNECTED.

COMMUNICATION_ERROR

This can be returned with either a connection status of DISCONNECTED or DISCONNECTED_RETRYING.

When returned with a connection status of DISCONNECTED_RETRYING, this signifies that the client is trying to recover from a disconnect due to a transient exception. Do NOT close or open the client instance. Once the client successfully reports CONNECTED, operations will be resumed.

When returned with a connection status of DISCONNECTED, this signifies that client is disconnected due to a non-retryable exception. You should inspect the throwable supplied in the IotHubConnectionStatusChangeCallback to determine what action needs to be taken. If you want to perform more operations on the device client, you should closeNow() and then open() the client.

CONNECTION_OK

The client is connected, and ready to be used.

This is returned with a connection status of CONNECTED.

EXPIRED_SAS_TOKEN

The SAS token associated with the client has expired, and cannot be renewed. The supplied credentials need to be fixed before a connection can be established.

This is returned with a connection status of DISCONNECTED.

NO_NETWORK

The client was disconnected due to loss of network, the client will attempt for recovery.

This is returned with a connection status of DISCONNECTED_RETRYING.

RETRY_EXPIRED

The client was disconnected due to a transient exception, but the retry policy expired before a connection could be re-established. If you want to perform more operations on the device client, you should closeNow() and then open() the client.

This is returned with a connection status of DISCONNECTED.

适用于