Interface RPCHandler.Builder<T>
- Type Parameters:
T- the type that the handler is handling.
- All Superinterfaces:
RPCProvider.Builder<RPCHandler.Builder<T>>
- Enclosing interface:
RPCHandler
A builder for an RPC handler.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a new RPC handler based on the options provided to this builder.targetInstance(T instance) Sets the target instance on which all incoming RPC calls should be executed.Methods inherited from interface eu.cloudnetservice.driver.network.rpc.RPCProvider.Builder
dataBufFactory, objectMapper
-
Method Details
-
targetInstance
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.
-