Interface RPCInvocationContext
- All Known Implementing Classes:
DefaultRPCInvocationContext
public interface RPCInvocationContext
The invocation context holds all information needed for a handler to process a method a call properly.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents the builder for a rpc invocation context. -
Method Summary
Modifier and TypeMethodDescriptionintGet the amount of arguments the target method must have.Get the data buffer slice which should contain the argument information for the current method invocation.builder()Get a new builder instance for a rpc invocation context.channel()Get the network channel from which the invocation request came.booleanGet if the rpc invocation expects a result sent back to the sender.Get the name of the method which should be invoked during the current rpc processing.booleanGet if primitive return values should be normalized when unprocessable due to for example null return values during a downstream method invocation.booleanGet if the instance supplied to this context must be used or if the rpc handler is free to use the instance to which its bound.Get the instance (if any) which should be considered first for a method invocation.
-
Method Details
-
builder
Get a new builder instance for a rpc invocation context.- Returns:
- a new invocation context builder.
-
argumentCount
int argumentCount()Get the amount of arguments the target method must have.- Returns:
- the amount of arguments of the target method.
-
expectsMethodResult
boolean expectsMethodResult()Get if the rpc invocation expects a result sent back to the sender.- Returns:
- true if the rpc call expects a result, false otherwise.
-
normalizePrimitives
boolean normalizePrimitives()Get if primitive return values should be normalized when unprocessable due to for example null return values during a downstream method invocation.- Returns:
- true if primitives should be normalized, false otherwise.
-
strictInstanceUsage
boolean strictInstanceUsage()Get if the instance supplied to this context must be used or if the rpc handler is free to use the instance to which its bound.- Returns:
- true if the instance usage during processing should be strict, false otherwise.
-
methodName
Get the name of the method which should be invoked during the current rpc processing.- Returns:
- the name of the method which should be invoked.
-
channel
Get the network channel from which the invocation request came.- Returns:
- the network channel from which the invocation request came.
-
argumentInformation
Get the data buffer slice which should contain the argument information for the current method invocation. The buffer might however also contain information for the next rpc calls in the chain (if any).- Returns:
- the data buffer which should contain the argument information for the current method invocation.
-
workingInstance
Get the instance (if any) which should be considered first for a method invocation. This is used for calling methods based on the result of the previous rpc in a chained rpc.- Returns:
- the instance to use for calling the requested method (if any).
-