Enum Class FetchStatus

java.lang.Object
java.lang.Enum<FetchStatus>
org.cy3sbml.util.FetchStatus
All Implemented Interfaces:
Serializable, Comparable<FetchStatus>, Constable

public enum FetchStatus extends Enum<FetchStatus>
Outcome of a single HttpJson fetch, distinguishing "not found" (e.g. an HTTP 404, or an equivalent empty-result response) from a transport or parse error (e.g. a timeout, connection failure or malformed body).

The distinction matters for caching: a "not found" result is safe to cache for a short time, while an error should not be cached, so a transient outage (e.g. while offline) recovers on the next lookup.

  • Enum Constant Details

  • Method Details

    • values

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