public enum HttpError extends Enum<HttpError> implements org.mule.runtime.extension.api.error.ErrorTypeDefinition<HttpError>
| Enum Constant and Description |
|---|
BAD_REQUEST |
CONNECTIVITY |
FORBIDDEN |
INTERNAL_SERVER_ERROR |
METHOD_NOT_ALLOWED |
NOT_ACCEPTABLE |
NOT_FOUND |
PARSING |
RESPONSE_VALIDATION |
SECURITY |
SERVICE_UNAVAILABLE |
TIMEOUT |
TOO_MANY_REQUESTS |
TRANSFORMATION |
UNAUTHORIZED |
UNSUPPORTED_MEDIA_TYPE |
| Modifier and Type | Method and Description |
|---|---|
static Optional<HttpError> |
getErrorByCode(int statusCode)
Returns the
HttpError corresponding to a given status code. |
static Optional<HttpConstants.HttpStatus> |
getHttpStatus(HttpError error)
Returns an
HttpConstants.HttpStatus corresponding to a given HttpError. |
Optional<org.mule.runtime.extension.api.error.ErrorTypeDefinition<? extends Enum<?>>> |
getParent() |
static HttpError |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HttpError[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpError PARSING
public static final HttpError TIMEOUT
public static final HttpError SECURITY
public static final HttpError TRANSFORMATION
public static final HttpError CONNECTIVITY
public static final HttpError RESPONSE_VALIDATION
public static final HttpError BAD_REQUEST
public static final HttpError UNAUTHORIZED
public static final HttpError FORBIDDEN
public static final HttpError NOT_FOUND
public static final HttpError METHOD_NOT_ALLOWED
public static final HttpError NOT_ACCEPTABLE
public static final HttpError UNSUPPORTED_MEDIA_TYPE
public static final HttpError TOO_MANY_REQUESTS
public static final HttpError INTERNAL_SERVER_ERROR
public static final HttpError SERVICE_UNAVAILABLE
public static HttpError[] values()
for (HttpError c : HttpError.values()) System.out.println(c);
public static HttpError valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic Optional<org.mule.runtime.extension.api.error.ErrorTypeDefinition<? extends Enum<?>>> getParent()
getParent in interface org.mule.runtime.extension.api.error.ErrorTypeDefinition<HttpError>public static Optional<HttpError> getErrorByCode(int statusCode)
HttpError corresponding to a given status code. A match is found if there's an HttpError with
the same name as the status code's corresponding HttpConstants.HttpStatus.statusCode - the HTTP status code to search forOptional with thepublic static Optional<HttpConstants.HttpStatus> getHttpStatus(HttpError error)
HttpConstants.HttpStatus corresponding to a given HttpError. A match is found if there's an HttpConstants.HttpStatus
with the same name as the HttpError.error - the HttpError to matchCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.