Interface RPCHandler

All Superinterfaces:
RPCProvider

public interface RPCHandler extends RPCProvider
A handler for any rpc invocation happening on the network. Every handler is bound to a specific class and optionally its instance it is handling. If the instance is not given, the handler is a placeholder which is only working with the result of the previous method calls in chained rpc calls.
Since:
4.0
  • Method Details

    • handle

      Handles the given rpc context using the information of this handler. A handler must respect all settings set in the context. The handler decides whether it can handle the request based on the information provided through the context. If the instance use is set to strict in the context (or this handler has no instance set since construction) and no instance is provided through the context, the handler should return a successful result containing either null or the default primitive value based on the return value of the target method (if normalize primitives is set to true in the context). If an exception happens during the post of the rpc to the underlying method the result should be a failure containing as its result the thrown exception.
      Parameters:
      context - the context of the handler invocation.
      Returns:
      the result of the handler execution.
      Throws:
      NullPointerException - if the given context is null.