Interface JsonRpcHandlers

All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
JsonRpcHandlers.BuilderBase.JsonRpcHandlersImpl

public interface JsonRpcHandlers extends Prototype.Api
Blueprint for JSON-RPC handlers. Each handler must have a method name associated with it.
See Also:
  • Method Details

    • builder

      static JsonRpcHandlers.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static JsonRpcHandlers.Builder builder(JsonRpcHandlers instance)
      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static JsonRpcHandlers create()
      Create a new instance with default values.
      Returns:
      a new instance
    • handlersMap

      Map<String,JsonRpcHandler> handlersMap()
      Return a map of method names to handlers.
      Returns:
      a map of method names to handlers
    • errorHandler

      Optional<JsonRpcErrorHandler> errorHandler()
      Get access to the error handler, if registered.
      Returns:
      the error handler or null
    • exceptionMap

      Map<Class<? extends Throwable>,JsonRpcExceptionHandler> exceptionMap()
      Return a map of throwable to exception handlers.
      Returns:
      a map of method names to handlers