Package io.meeds.commons.http
Enum Class SafeFetchFailure
- All Implemented Interfaces:
Serializable,Comparable<SafeFetchFailure>,Constable
Why
SafeHttpFetcher read nothing usable from a URL. Each value names
a decision a caller can act on or report; none carries the URL, which may
embed a secret.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe answer declares a content type outside the accepted set.A user name or password in the URL.An answer the read cannot use: a status outside 2xx, a 304 to a read that sent no validator, or a redirect without aLocation.Not a usable absolute URL.A port outside the allowed set.The host resolves to an address the platform must not reach.A scheme outside the allowed set.The answer took too long.The answer is larger than allowed.More redirects than followed.No answer could be read.The host resolves to nothing. -
Method Summary
Modifier and TypeMethodDescriptionstatic SafeFetchFailureReturns the enum constant of this class with the specified name.static SafeFetchFailure[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INVALID_URL
Not a usable absolute URL. -
SCHEME_NOT_ALLOWED
A scheme outside the allowed set. -
PORT_NOT_ALLOWED
A port outside the allowed set. -
CREDENTIALS_IN_URL
A user name or password in the URL. -
REFUSED_ADDRESS
The host resolves to an address the platform must not reach. -
UNRESOLVABLE
The host resolves to nothing. -
UNREACHABLE
No answer could be read. -
TIMEOUT
The answer took too long. -
HTTP_ERROR
An answer the read cannot use: a status outside 2xx, a 304 to a read that sent no validator, or a redirect without aLocation. -
TOO_LARGE
The answer is larger than allowed. -
TOO_MANY_REDIRECTS
More redirects than followed. -
CONTENT_TYPE_NOT_ALLOWED
The answer declares a content type outside the accepted set.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getDescription
- Returns:
- the fixed phrase reported for this failure, never a URL
-