Enum Class RpcStatus

java.lang.Object
java.lang.Enum<RpcStatus>
ru.pathcreator.pyc.rpc.core.exceptions.RpcStatus
All Implemented Interfaces:
Serializable, Comparable<RpcStatus>, Constable

public enum RpcStatus extends Enum<RpcStatus>
Встроенные RPC status code-ы для transport-слоя и общих service-level ошибок.

Built-in RPC status codes used by the transport and by shared service-level validation failures.

Числовые значения намеренно повторяют знакомую HTTP-style семантику, чтобы логи, метрики, дашборды и client-side обработка оставались интуитивными.

The numeric values intentionally follow familiar HTTP-style semantics so logs, metrics, dashboards, and client-side handling remain easy to interpret.

Диапазоны 4xx и 5xx зарезервированы библиотекой для built-in transport и system meanings. Application-defined business code-ы должны использовать значения >= 1000.

The library reserves the standard 4xx and 5xx ranges for built-in transport/system meanings. Application-defined business codes must use values >= 1000.

  • Enum Constant Details

    • CONTINUE

      public static final RpcStatus CONTINUE
      100 Continue / продолжайте запрос.
    • SWITCHING_PROTOCOLS

      public static final RpcStatus SWITCHING_PROTOCOLS
      101 Switching Protocols / переключение протокола.
    • PROCESSING

      public static final RpcStatus PROCESSING
      102 Processing / запрос обрабатывается.
    • EARLY_HINTS

      public static final RpcStatus EARLY_HINTS
      103 Early Hints / ранние подсказки.
    • OK

      public static final RpcStatus OK
      200 OK / успех.
    • CREATED

      public static final RpcStatus CREATED
      201 Created / создано.
    • ACCEPTED

      public static final RpcStatus ACCEPTED
      202 Accepted / принято в обработку.
    • NON_AUTHORITATIVE_INFORMATION

      public static final RpcStatus NON_AUTHORITATIVE_INFORMATION
      203 Non-Authoritative Information / неавторитативная информация.
    • NO_CONTENT

      public static final RpcStatus NO_CONTENT
      204 No Content / нет тела ответа.
    • RESET_CONTENT

      public static final RpcStatus RESET_CONTENT
      205 Reset Content / сброс содержимого.
    • PARTIAL_CONTENT

      public static final RpcStatus PARTIAL_CONTENT
      206 Partial Content / частичное содержимое.
    • MULTI_STATUS

      public static final RpcStatus MULTI_STATUS
      207 Multi-Status / множественный статус.
    • ALREADY_REPORTED

      public static final RpcStatus ALREADY_REPORTED
      208 Already Reported / уже сообщено.
    • IM_USED

      public static final RpcStatus IM_USED
      226 IM Used / использован IM.
    • MULTIPLE_CHOICES

      public static final RpcStatus MULTIPLE_CHOICES
      300 Multiple Choices / несколько вариантов.
    • MOVED_PERMANENTLY

      public static final RpcStatus MOVED_PERMANENTLY
      301 Moved Permanently / постоянно перемещено.
    • FOUND

      public static final RpcStatus FOUND
      302 Found / временно найдено.
    • SEE_OTHER

      public static final RpcStatus SEE_OTHER
      303 See Other / смотри другое.
    • NOT_MODIFIED

      public static final RpcStatus NOT_MODIFIED
      304 Not Modified / не изменено.
    • USE_PROXY

      public static final RpcStatus USE_PROXY
      305 Use Proxy / используй proxy.
    • TEMPORARY_REDIRECT

      public static final RpcStatus TEMPORARY_REDIRECT
      307 Temporary Redirect / временный редирект.
    • PERMANENT_REDIRECT

      public static final RpcStatus PERMANENT_REDIRECT
      308 Permanent Redirect / постоянный редирект.
    • BAD_REQUEST

      public static final RpcStatus BAD_REQUEST
      400 Bad Request / некорректный запрос.
    • UNAUTHORIZED

      public static final RpcStatus UNAUTHORIZED
      401 Unauthorized / не авторизовано.
    • PAYMENT_REQUIRED

      public static final RpcStatus PAYMENT_REQUIRED
      402 Payment Required / требуется оплата.
    • FORBIDDEN

      public static final RpcStatus FORBIDDEN
      403 Forbidden / доступ запрещен.
    • NOT_FOUND

      public static final RpcStatus NOT_FOUND
      404 Not Found / не найдено.
    • METHOD_NOT_ALLOWED

      public static final RpcStatus METHOD_NOT_ALLOWED
      405 Method Not Allowed / метод не поддерживается.
    • NOT_ACCEPTABLE

      public static final RpcStatus NOT_ACCEPTABLE
      406 Not Acceptable / неприемлемо.
    • PROXY_AUTHENTICATION_REQUIRED

      public static final RpcStatus PROXY_AUTHENTICATION_REQUIRED
      407 Proxy Authentication Required / нужна proxy-авторизация.
    • REQUEST_TIMEOUT

      public static final RpcStatus REQUEST_TIMEOUT
      408 Request Timeout / таймаут запроса.
    • CONFLICT

      public static final RpcStatus CONFLICT
      409 Conflict / конфликт.
    • GONE

      public static final RpcStatus GONE
      410 Gone / ресурс удален.
    • LENGTH_REQUIRED

      public static final RpcStatus LENGTH_REQUIRED
      411 Length Required / нужен Content-Length.
    • PRECONDITION_FAILED

      public static final RpcStatus PRECONDITION_FAILED
      412 Precondition Failed / precondition не выполнена.
    • PAYLOAD_TOO_LARGE

      public static final RpcStatus PAYLOAD_TOO_LARGE
      413 Payload Too Large / payload слишком большой.
    • URI_TOO_LONG

      public static final RpcStatus URI_TOO_LONG
      414 URI Too Long / URI слишком длинный.
    • UNSUPPORTED_MEDIA_TYPE

      public static final RpcStatus UNSUPPORTED_MEDIA_TYPE
      415 Unsupported Media Type / неподдерживаемый media type.
    • RANGE_NOT_SATISFIABLE

      public static final RpcStatus RANGE_NOT_SATISFIABLE
      416 Range Not Satisfiable / range невозможно удовлетворить.
    • EXPECTATION_FAILED

      public static final RpcStatus EXPECTATION_FAILED
      417 Expectation Failed / expectation не выполнена.
    • I_AM_A_TEAPOT

      public static final RpcStatus I_AM_A_TEAPOT
      418 I'm a Teapot / шуточный HTTP статус.
    • MISDIRECTED_REQUEST

      public static final RpcStatus MISDIRECTED_REQUEST
      421 Misdirected Request / запрос адресован не туда.
    • UNPROCESSABLE_ENTITY

      public static final RpcStatus UNPROCESSABLE_ENTITY
      422 Unprocessable Entity / невозможно обработать сущность.
    • LOCKED

      public static final RpcStatus LOCKED
      423 Locked / заблокировано.
    • FAILED_DEPENDENCY

      public static final RpcStatus FAILED_DEPENDENCY
      424 Failed Dependency / ошибка зависимости.
    • TOO_EARLY

      public static final RpcStatus TOO_EARLY
      425 Too Early / слишком рано.
    • UPGRADE_REQUIRED

      public static final RpcStatus UPGRADE_REQUIRED
      426 Upgrade Required / требуется upgrade.
    • PRECONDITION_REQUIRED

      public static final RpcStatus PRECONDITION_REQUIRED
      428 Precondition Required / требуется precondition.
    • TOO_MANY_REQUESTS

      public static final RpcStatus TOO_MANY_REQUESTS
      429 Too Many Requests / слишком много запросов.
    • REQUEST_HEADER_FIELDS_TOO_LARGE

      public static final RpcStatus REQUEST_HEADER_FIELDS_TOO_LARGE
      431 Request Header Fields Too Large / заголовки слишком большие.
    • INTERNAL_SERVER_ERROR

      public static final RpcStatus INTERNAL_SERVER_ERROR
      500 Internal Server Error / внутренняя ошибка сервера.
    • NOT_IMPLEMENTED

      public static final RpcStatus NOT_IMPLEMENTED
      501 Not Implemented / не реализовано.
    • BAD_GATEWAY

      public static final RpcStatus BAD_GATEWAY
      502 Bad Gateway / плохой gateway.
    • SERVICE_UNAVAILABLE

      public static final RpcStatus SERVICE_UNAVAILABLE
      503 Service Unavailable / сервис недоступен.
    • GATEWAY_TIMEOUT

      public static final RpcStatus GATEWAY_TIMEOUT
      504 Gateway Timeout / таймаут gateway.
    • HTTP_VERSION_NOT_SUPPORTED

      public static final RpcStatus HTTP_VERSION_NOT_SUPPORTED
      505 HTTP Version Not Supported / версия HTTP не поддерживается.
    • VARIANT_ALSO_NEGOTIATES

      public static final RpcStatus VARIANT_ALSO_NEGOTIATES
      506 Variant Also Negotiates / variant некорректно negotiates.
    • INSUFFICIENT_STORAGE

      public static final RpcStatus INSUFFICIENT_STORAGE
      507 Insufficient Storage / недостаточно хранилища.
    • LOOP_DETECTED

      public static final RpcStatus LOOP_DETECTED
      508 Loop Detected / обнаружен цикл.
    • NOT_EXTENDED

      public static final RpcStatus NOT_EXTENDED
      510 Not Extended / не продлено.
    • NETWORK_AUTHENTICATION_REQUIRED

      public static final RpcStatus NETWORK_AUTHENTICATION_REQUIRED
      511 Network Authentication Required / требуется сетевая авторизация.
  • Method Details

    • values

      public static RpcStatus[] 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 RpcStatus 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
    • code

      public int code()
      Returns the numeric status code.
      Returns:
      numeric status code
    • isInformational

      public boolean isInformational()
      Returns whether the status belongs to the 1xx informational range.
      Returns:
      true for informational statuses
    • isSuccess

      public boolean isSuccess()
      Returns whether the status belongs to the 2xx success range.
      Returns:
      true for success statuses
    • isRedirect

      public boolean isRedirect()
      Returns whether the status belongs to the 3xx redirection range.
      Returns:
      true for redirect-like statuses
    • isClientError

      public boolean isClientError()
      Returns whether the status belongs to the 4xx client-error range.
      Returns:
      true for client errors
    • isServerError

      public boolean isServerError()
      Returns whether the status belongs to the 5xx server-error range.
      Returns:
      true for server errors
    • isRetryable

      public boolean isRetryable()
      Returns whether the status is commonly retryable for transport callers.
      Returns:
      true for statuses that can reasonably be retried
    • fromCode

      public static RpcStatus fromCode(int code)
      Resolves a numeric code into a known status when possible.
      Parameters:
      code - numeric status code
      Returns:
      matching enum value or null for custom codes