public enum IotHubStatusCode extends java.lang.Enum<IotHubStatusCode>
| Enum Constant and Description |
|---|
BAD_FORMAT
The request failed because it had one or more format issues.
|
DEVICE_OPERATION_TIMED_OUT
The request failed because it took longer than the device operation timeout as defined in
InternalClient.setOperationTimeout(long)
or took longer than the timeout as defined in a synchronous operation such as InternalClient.sendEvent(Message, int). |
ERROR
The request failed for an unknown reason.
|
INTERNAL_SERVER_ERROR
The service encountered an error while handling the request.
|
IO_ERROR
The request failed because of network level issues.
|
MESSAGE_CANCELLED_ONCLOSE
The request failed to be sent to the service and/or acknowledged by the service before the client was closed.
|
MESSAGE_EXPIRED
The request failed to be sent to the service and/or acknowledged by the service before it expired.
|
NOT_FOUND
The request failed because the resource the request targeted does not exist.
|
OK
The request completed without exception
|
PRECONDITION_FAILED
The request failed because the request provided an out of date ETag or version number.
|
QUOTA_EXCEEDED
The request failed because the quota for such operations has been exceeded.
|
REQUEST_ENTITY_TOO_LARGE
The request failed because the request payload exceeded IoT Hub's size limits.
|
SERVER_BUSY
The request was rejected by the service because it is too busy to handle it right now.
|
THROTTLED
The request was rejected by the service because the service is handling too many requests right now.
|
UNAUTHORIZED
The request failed because the provided credentials are out of date or incorrect.
|
| Modifier and Type | Method and Description |
|---|---|
static IotHubServiceException |
getConnectionStatusException(IotHubStatusCode statusCode,
java.lang.String statusDescription) |
static IotHubStatusCode |
getIotHubStatusCode(int httpsStatus)
Returns the IoT Hub status code referenced by the HTTPS status code.
|
static boolean |
isRetryable(IotHubStatusCode statusCode)
Returns true if this event callback signals that the asynchronous action was unsuccessful, but could be retried.
|
static boolean |
isSuccessful(IotHubStatusCode statusCode)
Returns true if this event callback signals that the asynchronous action was successful, and false otherwise.
|
static IotHubClientException |
toException(IotHubStatusCode statusCode) |
static IotHubStatusCode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static IotHubStatusCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IotHubStatusCode OK
public static final IotHubStatusCode BAD_FORMAT
public static final IotHubStatusCode UNAUTHORIZED
public static final IotHubStatusCode QUOTA_EXCEEDED
For file upload operations, this signifies that the maximum number of concurrent file upload operations are already happening.
For telemetry operations, this signifies that the IoT hub has reached its daily quota for the number of messages ingested.
public static final IotHubStatusCode NOT_FOUND
public static final IotHubStatusCode PRECONDITION_FAILED
public static final IotHubStatusCode REQUEST_ENTITY_TOO_LARGE
public static final IotHubStatusCode THROTTLED
public static final IotHubStatusCode INTERNAL_SERVER_ERROR
public static final IotHubStatusCode SERVER_BUSY
public static final IotHubStatusCode ERROR
public static final IotHubStatusCode MESSAGE_EXPIRED
public static final IotHubStatusCode MESSAGE_CANCELLED_ONCLOSE
public static final IotHubStatusCode IO_ERROR
public static final IotHubStatusCode DEVICE_OPERATION_TIMED_OUT
InternalClient.setOperationTimeout(long)
or took longer than the timeout as defined in a synchronous operation such as InternalClient.sendEvent(Message, int).public static IotHubStatusCode[] values()
for (IotHubStatusCode c : IotHubStatusCode.values()) System.out.println(c);
public static IotHubStatusCode 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 nullpublic static IotHubServiceException getConnectionStatusException(IotHubStatusCode statusCode, java.lang.String statusDescription)
public static IotHubStatusCode getIotHubStatusCode(int httpsStatus)
httpsStatus - the HTTPS status code.java.lang.IllegalArgumentException - if the HTTPS status code does not map to
an IoT Hub status code.public static boolean isRetryable(IotHubStatusCode statusCode)
statusCode - The status code.public static boolean isSuccessful(IotHubStatusCode statusCode)
statusCode - The status code.public static IotHubClientException toException(IotHubStatusCode statusCode)
Copyright © 2023. All rights reserved.