public enum IotHubConnectionStatusChangeReason extends java.lang.Enum<IotHubConnectionStatusChangeReason>
| Enum Constant and Description |
|---|
BAD_CREDENTIAL
Incorrect credentials were supplied to the client instance.
|
CLIENT_CLOSE
The client has been closed gracefully.
|
COMMUNICATION_ERROR
This can be returned with either a connection status of
IotHubConnectionStatus.DISCONNECTED or IotHubConnectionStatus.DISCONNECTED_RETRYING. |
CONNECTION_OK
The client is connected, and ready to be used.
|
EXPIRED_SAS_TOKEN
The SAS token associated with the client has expired, and cannot be renewed.
|
NO_NETWORK
The client was disconnected due to loss of network, the client will attempt for recovery.
|
RETRY_EXPIRED
The client was disconnected due to a transient exception, but the retry policy expired before a connection could be re-established.
|
| Modifier and Type | Method and Description |
|---|---|
static IotHubConnectionStatusChangeReason |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static IotHubConnectionStatusChangeReason[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IotHubConnectionStatusChangeReason EXPIRED_SAS_TOKEN
This is returned with a connection status of IotHubConnectionStatus.DISCONNECTED.
public static final IotHubConnectionStatusChangeReason BAD_CREDENTIAL
This is returned with a connection status of IotHubConnectionStatus.DISCONNECTED.
public static final IotHubConnectionStatusChangeReason RETRY_EXPIRED
DeviceClient.close() and then DeviceClient.open(boolean) the client.
This is returned with a connection status of IotHubConnectionStatus.DISCONNECTED.
public static final IotHubConnectionStatusChangeReason NO_NETWORK
This is returned with a connection status of IotHubConnectionStatus.DISCONNECTED_RETRYING.
public static final IotHubConnectionStatusChangeReason COMMUNICATION_ERROR
IotHubConnectionStatus.DISCONNECTED or IotHubConnectionStatus.DISCONNECTED_RETRYING.
When returned with a connection status of IotHubConnectionStatus.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 IotHubConnectionStatus.CONNECTED, operations will be resumed.
When returned with a connection status of IotHubConnectionStatus.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 DeviceClient.close() and then DeviceClient.open(boolean) the client.
public static final IotHubConnectionStatusChangeReason CONNECTION_OK
This is returned with a connection status of IotHubConnectionStatus.CONNECTED.
public static final IotHubConnectionStatusChangeReason CLIENT_CLOSE
This is returned with a connection status of IotHubConnectionStatus.DISCONNECTED.
public static IotHubConnectionStatusChangeReason[] values()
for (IotHubConnectionStatusChangeReason c : IotHubConnectionStatusChangeReason.values()) System.out.println(c);
public static IotHubConnectionStatusChangeReason valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullCopyright © 2023. All rights reserved.