Interface RPCFactory


public interface RPCFactory
A factory for the root RPC types.
Since:
4.0
  • Method Details

    • newRPCSenderBuilder

      @NonNull RPCSender.Builder newRPCSenderBuilder(@NonNull @NonNull Class<?> target)
      Constructs a new builder for an RPC sender which can provide RPCs for the given target class and all subclasses in the tree.
      Parameters:
      target - the target class for which the rpc sender should be constructed.
      Returns:
      a builder for an RPC sender that targets the given target class.
      Throws:
      NullPointerException - if the given target class is null.
      IllegalArgumentException - if some precondition, to ensure functionality with rpc, fails.
      IllegalStateException - if some precondition, to ensure functionality with rpc, fails.
    • newRPCHandlerBuilder

      @NonNull <T> RPCHandler.Builder<T> newRPCHandlerBuilder(@NonNull @NonNull Class<T> target)
      Constructs a new rpc handler builder which can handle RPC requests for the given target class.
      Type Parameters:
      T - the target type.
      Parameters:
      target - the target class that should be handled by the RPC handler.
      Returns:
      a new builder for an RPC handler which can handle RPC requests for the given target class.
      Throws:
      NullPointerException - if the given target class is null.
      IllegalArgumentException - if some precondition, to ensure functionality with rpc, fails.
      IllegalStateException - if some precondition, to ensure functionality with rpc, fails.
    • newRPCBasedImplementationBuilder

      @NonNull <T> @NonNull RPCImplementationBuilder<T> newRPCBasedImplementationBuilder(@NonNull @NonNull Class<T> baseClass)
      Constructs a builder for an RPC-based api implementation for all non-static methods in the given base class.
      Type Parameters:
      T - the type being implemented.
      Parameters:
      baseClass - the base class which should be implemented.
      Returns:
      a builder for a base implementation of the given base class.
      Throws:
      NullPointerException - if the given base class is null.
      IllegalArgumentException - if some precondition, to ensure functionality with rpc, fails.
      IllegalStateException - if some precondition, to ensure functionality with rpc, fails.