Enum Class ResponseStatus

java.lang.Object
java.lang.Enum<ResponseStatus>
live.crowdcontrol.cc4j.websocket.data.ResponseStatus
All Implemented Interfaces:
Serializable, Comparable<ResponseStatus>, Constable

public enum ResponseStatus extends Enum<ResponseStatus>
Describes the outcome of an effect-request.
  • Enum Constant Details

    • SUCCESS

      public static final ResponseStatus SUCCESS
      The non-timed effect executed successfully.
    • FAIL_TEMPORARY

      public static final ResponseStatus FAIL_TEMPORARY
      The effect failed to execute but may work another time.
    • FAIL_PERMANENT

      public static final ResponseStatus FAIL_PERMANENT
      The effect failed to execute and should never be requested again (at least for this session).
    • DELAY_ESTIMATED

      public static final ResponseStatus DELAY_ESTIMATED
      The effect could not be applied instantly but is expecting to apply soon. This is currently unused.
    • TIMED_BEGIN

      public static final ResponseStatus TIMED_BEGIN
      The timed effect began successfully.
    • TIMED_PAUSE

      public static final ResponseStatus TIMED_PAUSE
      The timed effect has been paused.
    • TIMED_RESUME

      public static final ResponseStatus TIMED_RESUME
      The timed effect has been resumed.
    • TIMED_END

      public static final ResponseStatus TIMED_END
      The timed effect has ended.
    • UNKNOWN

      public static final ResponseStatus UNKNOWN
      The JSON-specified value could not be decoded.
  • Method Details

    • values

      public static ResponseStatus[] 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 ResponseStatus 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
    • fromValue

      @NotNull public static @NotNull ResponseStatus fromValue(@NotNull @NotNull String value)
      Gets a status from its JSON string value. If a status by the provided name could not be found, returns UNKNOWN.
      Parameters:
      value - JSON string value
      Returns:
      result status value
    • getValue

      @NotNull public @NotNull String getValue()
      Gets the encoded string value of this status.
      Returns:
      json value
    • isTimed

      public boolean isTimed()
      Gets whether this status represents a timed status. A timed status is required to use CCTimedEffectResponse, while non-timed statuses are required to use CCInstantEffectResponse.
      Returns:
      is timed status
    • isTerminating

      public boolean isTerminating()
      Gets whether this status represents a terminating status. A terminating status is one that finalizes whether an effect should consume or refund coins.
      Returns:
      is terminating status
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ResponseStatus>