Enum GrpcStatus

java.lang.Object
java.lang.Enum<GrpcStatus>
io.vertx.grpc.common.GrpcStatus
All Implemented Interfaces:
Serializable, Comparable<GrpcStatus>

public enum GrpcStatus extends Enum<GrpcStatus>
gRPC statuses.
Author:
Julien Viet
  • Enum Constant Details

    • OK

      public static final GrpcStatus OK
    • CANCELLED

      public static final GrpcStatus CANCELLED
    • UNKNOWN

      public static final GrpcStatus UNKNOWN
    • INVALID_ARGUMENT

      public static final GrpcStatus INVALID_ARGUMENT
    • DEADLINE_EXCEEDED

      public static final GrpcStatus DEADLINE_EXCEEDED
    • NOT_FOUND

      public static final GrpcStatus NOT_FOUND
    • ALREADY_EXISTS

      public static final GrpcStatus ALREADY_EXISTS
    • PERMISSION_DENIED

      public static final GrpcStatus PERMISSION_DENIED
    • RESOURCE_EXHAUSTED

      public static final GrpcStatus RESOURCE_EXHAUSTED
    • FAILED_PRECONDITION

      public static final GrpcStatus FAILED_PRECONDITION
    • ABORTED

      public static final GrpcStatus ABORTED
    • OUT_OF_RANGE

      public static final GrpcStatus OUT_OF_RANGE
    • UNIMPLEMENTED

      public static final GrpcStatus UNIMPLEMENTED
    • INTERNAL

      public static final GrpcStatus INTERNAL
    • UNAVAILABLE

      public static final GrpcStatus UNAVAILABLE
    • DATA_LOSS

      public static final GrpcStatus DATA_LOSS
    • UNAUTHENTICATED

      public static final GrpcStatus UNAUTHENTICATED
  • Field Details

    • code

      public final int code
  • Method Details

    • values

      public static GrpcStatus[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static GrpcStatus valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

      public static GrpcStatus valueOf(int code)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      code - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • fromHttpStatusCode

      public static GrpcStatus fromHttpStatusCode(int sc)
      Map an HTTP status code to a gRPC status, see spec.
      Parameters:
      sc - the HTTP status code
      Returns:
      the mapped status code
    • toString

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