Interface RPCInvocationResult

All Known Implementing Classes:
RPCInvocationResult.BadRequest, RPCInvocationResult.Failure, RPCInvocationResult.ServerError, RPCInvocationResult.Success

The result of an RPC method invocation, either successful or failed.
Since:
4.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Represents an invocation result for an invocation that cannot be processed due to bad data sent by the client.
    static final record 
    Represents an invocation during which the target method threw an exception.
    static final record 
    Represents 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 record 
    Represents a successful method invocation via RPC.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final byte
    Indicates that the client send a bad request to the RPC handler.
    static final byte
    An error was thrown during the method handling, part of the stacktrace is included in the response.
    static final byte
    The RPC was processed successfully on the remote side and the response contains the method invocation result.
    static final byte
    Indicates that there was a server error which made it impossible to handle the request.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the handler that did handle the RPC request.
    boolean
    Get if the method invocation was successful or not.
  • Field Details

    • STATUS_OK

      static final byte STATUS_OK
      The RPC was processed successfully on the remote side and the response contains the method invocation result.
      See Also:
    • STATUS_ERROR

      static final byte STATUS_ERROR
      An 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_REQUEST
      Indicates that the client send a bad request to the RPC handler.
      See Also:
    • STATUS_SERVER_ERROR

      static final byte STATUS_SERVER_ERROR
      Indicates 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

      @NonNull @NonNull RPCHandler invocationHandler()
      Get the handler that did handle the RPC request.
      Returns:
      the handler that did handle the RPC request.