Interface RPCInvocationResult
- All Known Implementing Classes:
RPCInvocationResult.BadRequest,RPCInvocationResult.Failure,RPCInvocationResult.ServerError,RPCInvocationResult.Success
public sealed interface RPCInvocationResult
permits RPCInvocationResult.Success, RPCInvocationResult.Failure, RPCInvocationResult.BadRequest, RPCInvocationResult.ServerError
The result of an RPC method invocation, either successful or failed.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordRepresents an invocation result for an invocation that cannot be processed due to bad data sent by the client.static final recordRepresents an invocation during which the target method threw an exception.static final recordRepresents an invocation result for an invocation that failed because there was some mismatch on the server side that caused the request to be unprocessable.static final recordRepresents a successful method invocation via RPC. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteIndicates that the client send a bad request to the RPC handler.static final byteAn error was thrown during the method handling, part of the stacktrace is included in the response.static final byteThe RPC was processed successfully on the remote side and the response contains the method invocation result.static final byteIndicates that there was a server error which made it impossible to handle the request. -
Method Summary
Modifier and TypeMethodDescriptionGet the handler that did handle the RPC request.booleanGet if the method invocation was successful or not.
-
Field Details
-
STATUS_OK
static final byte STATUS_OKThe RPC was processed successfully on the remote side and the response contains the method invocation result.- See Also:
-
STATUS_ERROR
static final byte STATUS_ERRORAn error was thrown during the method handling, part of the stacktrace is included in the response.- See Also:
-
STATUS_BAD_REQUEST
static final byte STATUS_BAD_REQUESTIndicates that the client send a bad request to the RPC handler.- See Also:
-
STATUS_SERVER_ERROR
static final byte STATUS_SERVER_ERRORIndicates that there was a server error which made it impossible to handle the request.- See Also:
-
-
Method Details
-
wasSuccessful
boolean wasSuccessful()Get if the method invocation was successful or not.- Returns:
- true if the method invocation was successful, false otherwise.
-
invocationHandler
Get the handler that did handle the RPC request.- Returns:
- the handler that did handle the RPC request.
-