- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
JsonRpcHandlers.BuilderBase.JsonRpcHandlersImpl
Blueprint for JSON-RPC handlers. Each handler must have a method name
associated with it.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Fluent API builder forJsonRpcHandlers
.static class
JsonRpcHandlers.BuilderBase<BUILDER extends JsonRpcHandlers.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends JsonRpcHandlers> Fluent API builder base forJsonRpcHandlers
. -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonRpcHandlers.Builder
builder()
Create a new fluent API builder to customize configuration.static JsonRpcHandlers.Builder
builder
(JsonRpcHandlers instance) Create a new fluent API builder from an existing instance.static JsonRpcHandlers
create()
Create a new instance with default values.Get access to the error handler, if registered.Map
<Class<? extends Throwable>, JsonRpcExceptionHandler> Return a map of throwable to exception handlers.Return a map of method names to handlers.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
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
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
-