Enum Class SafeFetchFailure

java.lang.Object
java.lang.Enum<SafeFetchFailure>
io.meeds.commons.http.SafeFetchFailure
All Implemented Interfaces:
Serializable, Comparable<SafeFetchFailure>, Constable

public enum SafeFetchFailure extends Enum<SafeFetchFailure>
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.
  • Enum Constant Details

    • INVALID_URL

      public static final SafeFetchFailure INVALID_URL
      Not a usable absolute URL.
    • SCHEME_NOT_ALLOWED

      public static final SafeFetchFailure SCHEME_NOT_ALLOWED
      A scheme outside the allowed set.
    • PORT_NOT_ALLOWED

      public static final SafeFetchFailure PORT_NOT_ALLOWED
      A port outside the allowed set.
    • CREDENTIALS_IN_URL

      public static final SafeFetchFailure CREDENTIALS_IN_URL
      A user name or password in the URL.
    • REFUSED_ADDRESS

      public static final SafeFetchFailure REFUSED_ADDRESS
      The host resolves to an address the platform must not reach.
    • UNRESOLVABLE

      public static final SafeFetchFailure UNRESOLVABLE
      The host resolves to nothing.
    • UNREACHABLE

      public static final SafeFetchFailure UNREACHABLE
      No answer could be read.
    • TIMEOUT

      public static final SafeFetchFailure TIMEOUT
      The answer took too long.
    • HTTP_ERROR

      public static final SafeFetchFailure 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 a Location.
    • TOO_LARGE

      public static final SafeFetchFailure TOO_LARGE
      The answer is larger than allowed.
    • TOO_MANY_REDIRECTS

      public static final SafeFetchFailure TOO_MANY_REDIRECTS
      More redirects than followed.
    • CONTENT_TYPE_NOT_ALLOWED

      public static final SafeFetchFailure CONTENT_TYPE_NOT_ALLOWED
      The answer declares a content type outside the accepted set.
  • Method Details

    • values

      public static SafeFetchFailure[] 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

      public static SafeFetchFailure valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getDescription

      public String getDescription()
      Returns:
      the fixed phrase reported for this failure, never a URL