Interface GatewayRpcImplementation


public interface GatewayRpcImplementation
This interface is used to provide the Gateway with the necessary information to handle RPC calls. Your GatewayModuleHook should return an instance of this to opt in to RPC functionality for your module. The Gateway will then automatically use the provided serializer and router to handle incoming RPC calls if they match your module ID.

Recommended practice is to use the of() factory method to construct an instance that uses an RpcDelegate to handle RPC calls.

For example:


 class MyModuleHook extends AbstractGatewayModuleHook {
     @Override
     public Optional<GatewayRpcImplementation> getRpcImplementation() {
         return Optional.of(
             GatewayRpcImplementation.of(ProtoRpcSerializer.DEFAULT_INSTANCE, new MyModuleRpcImpl())
         );
     }
 }