Interface RPCHandler.Builder<T>

Type Parameters:
T - the type that the handler is handling.
All Superinterfaces:
RPCProvider.Builder<RPCHandler.Builder<T>>
Enclosing interface:
RPCHandler

public static interface RPCHandler.Builder<T> extends RPCProvider.Builder<RPCHandler.Builder<T>>
A builder for an RPC handler.
Since:
4.0
  • Method Details

    • targetInstance

      @NonNull @Contract("_ -> this") @NonNull RPCHandler.Builder<T> targetInstance(@Nullable T instance)
      Sets the target instance on which all incoming RPC calls should be executed. If the given instance is null, the invocation context must provide the instance to call the method on. If neither is present an exception is thrown during execution.
      Parameters:
      instance - the instance on which the target method should be called.
      Returns:
      this builder, for chaining.
    • build

      Builds a new RPC handler based on the options provided to this builder.
      Returns:
      a new RPC handler for the given target class.