finos/vuu

Make RpcHandler API Java friendly

Opened this issue · 2 comments

Currently, we define default implementation of methods inside the RpcHandler trait which isn't easily extendable in the Java world, user would still end up overriding all the methods.

Would be better if we can implement the RpcHandler as a pure interface, and all the default public methods could go inside an abstract/delegation class DefaultRPCHandler/BaseRpcHandler. This way a Java developer could simply extend the abstract class and would only need to implement/override methods that are actually required by the API contract / their use-case.

Also, we have methods inside the RpcHandler trait that are only needed internally and shouldn't be made public. So can clean that up as well with this change.

Other wish list

  • RPC request should not be tied to method names
  • The way users implement the different types of RPC should be consistent & can opt in to as many or as few as they wish. CustomRPC, EditRpc and MenuBasedRpc

RPC requests are not tied to method names.

The other items from the wishlist should be moved to the new issue.