Class EchoRpcModule

    • Constructor Detail

      • EchoRpcModule

        public EchoRpcModule()
    • Method Detail

      • beforeRun

        public void beforeRun()
      • processRequest

        public void processRequest​(EchoRequest request,
                                   java.util.concurrent.CompletableFuture<EchoResponse> future)
      • getId

        public java.lang.String getId()
        Description copied from interface: RpcModule
        Used to route the request/responses to the appropriate module. This ID should be unique for every RpcModule implementation.
      • createResponseWithException

        public EchoResponse createResponseWithException​(java.lang.Throwable ex)
        Description copied from interface: RpcModule
        Called when the RpcModule throws an exception while executing a request. This function should return a new RpcResponse that stores a string-based representation of the exception that occurred and make this available via RpcResponse.getErrorMessage() once un-marshaled.
        Parameters:
        ex - the exception that occurred
        Returns:
        a RpcResponse that stores the exception