Interface RPC
- All Superinterfaces:
ChainableRPC, RPCExecutable, RPCProvider
The basic rpc class. A rpc holds all information about what should be called on the receiver site of the rpc and
which information (if any) should get sent back when the current rpc expects a result. Exceptions are handled during
the process and will be rethrown on the sender side rather than the receiver site.
The target method which should get called by the rpc is identified in 3 steps:
- Using the supplied target class of the rpc.
- Using the name of the method supplied to the rpc.
- Using the amount of arguments supplied to the rpc.
By default, if on all network components is the same version of a class available there is no way a method can not be identified by rpc as the creation of a sender based on a class with unclear methods will instantly result in an exception to prevent exceptions during the runtime.
- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface RPCProvider
RPCProvider.Builder<B> -
Method Summary
Modifier and TypeMethodDescriptionGet the arguments which should get used to call the method.Get the fully qualified name of the class the target method is located in.Disables that this rpc is waiting for a result from the target network component.Get the expected result type of the method invocation.Get the descriptor string of the method that should be invoked.Get the name of the method which should get called.booleanGet whether the result of the method call is discarded and the execution of the method should not be waited for.sender()Get the sender from which the rpc call is coming (better known as the base class in which the method to call by this rpc is located in).Get the full metadata of the target method.timeout()Get the timeout that is applied to this RPC, if any.Sets the timeout that should be applied to the RPC.Methods inherited from interface ChainableRPC
joinMethods inherited from interface RPCExecutable
fire, fire, fireAndForget, fireAndForget, fireSync, fireSyncMethods inherited from interface RPCProvider
dataBufFactory, objectMapper, sourceFactory, targetClass
-
Method Details
-
sender
-
className
-
methodName
-
methodDescriptor
-
arguments
Get the arguments which should get used to call the method. The main identification of a method happens based on the name and the amount of arguments supplied. Invalid arguments might cause exceptions on the receiver site.- Returns:
- the arguments which should get used to call the method.
-
expectedResultType
-
targetMethod
Get the full metadata of the target method.- Returns:
- the full metadata of the target method.
-
timeout
Sets the timeout that should be applied to the RPC. The default value is derived from the target in the target class (using theRPCTimeoutannotation). If no timeout is set, the fire methods will wait for a method result forever.- Parameters:
timeout- the timeout to apply to the method invocation.- Returns:
- this RPC, for chaining.
-
timeout
-
dropResult
Disables that this rpc is waiting for a result from the target network component. By default, the current component will always wait for the target method to be executed on the receiver site, event if the method returns void.- Returns:
- the same instance used to call the method, for chaining.
-
resultDropped
boolean resultDropped()Get whether the result of the method call is discarded and the execution of the method should not be waited for.- Returns:
- true if the result of this RPC gets discarded, false otherwise.
-