Class RemoteRpcException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ru.pathcreator.pyc.rpc.core.exceptions.RpcException
ru.pathcreator.pyc.rpc.core.exceptions.RemoteRpcException
- All Implemented Interfaces:
Serializable
Исключение, которое наблюдает caller, когда другая сторона вернула
structured remote error.
Exception observed by the caller when the remote side returned a structured error response.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteRpcException(int statusCode, String message) Создаёт remote-исключение с кодом статуса и текстом ошибки. -
Method Summary
Modifier and TypeMethodDescriptionbooleanВозвращает, относится ли remote status к built-in client-error диапазону.booleanВозвращает, считается ли remote status retryable.booleanВозвращает, относится ли remote status к built-in server-error диапазону.status()Возвращает известный built-in статус для этого кода, если он есть.intВозвращает числовой remote status code.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RemoteRpcException
Создаёт remote-исключение с кодом статуса и текстом ошибки.Creates a remote exception with the provided status code and message.
- Parameters:
statusCode- код статуса remote-side / remote status codemessage- remote сообщение об ошибке / remote error message
-
-
Method Details
-
statusCode
public int statusCode()Возвращает числовой remote status code.Returns the remote status code.
- Returns:
- remote status code
-
status
Возвращает известный built-in статус для этого кода, если он есть.Returns the known transport status for this code when available.
- Returns:
- enum значение или
nullдля custom application codes / enum value ornullfor custom application codes
-
isRetryable
public boolean isRetryable()Возвращает, считается ли remote status retryable.Returns whether the remote status is known to be retryable.
- Returns:
truewhen the status is retryable
-
isClientError
public boolean isClientError()Возвращает, относится ли remote status к built-in client-error диапазону.Returns whether the remote status belongs to the built-in client-error range.
- Returns:
truewhen the status is a client error
-
isServerError
public boolean isServerError()Возвращает, относится ли remote status к built-in server-error диапазону.Returns whether the remote status belongs to the built-in server-error range.
- Returns:
truewhen the status is a server error
-