Class JsonRpcRouting.Builder
java.lang.Object
io.helidon.webserver.jsonrpc.JsonRpcRouting.Builder
- All Implemented Interfaces:
Builder<JsonRpcRouting.Builder, JsonRpcRouting>, Supplier<JsonRpcRouting>
- Enclosing class:
JsonRpcRouting
public static class JsonRpcRouting.Builder
extends Object
implements Builder<JsonRpcRouting.Builder, JsonRpcRouting>
Builder for
JsonRpcRouting.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aJsonRpcRoutingwith the registered services.register(String pathPattern, JsonRpcHandlers handlers) Register JSON-RPC handlers directly without implementing aJsonRpcService.register(String pathPattern, String method, JsonRpcHandler handler) Register a single JSON-RPC handler for a method and path pattern.service(JsonRpcService service) Add a JSON-RPC service to this routing.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault JsonRpcRoutingget()default JsonRpcRouting.Builderidentity()Instance of this builder as the correct type.default JsonRpcRouting.Builderupdate(Consumer<JsonRpcRouting.Builder> consumer) Update the builder in a fluent API way.
-
Method Details
-
build
Build aJsonRpcRoutingwith the registered services.- Specified by:
buildin interfaceBuilder<JsonRpcRouting.Builder, JsonRpcRouting>- Returns:
- a routing instance
-
service
Add a JSON-RPC service to this routing.- Parameters:
service- the server to add- Returns:
- this builder
-
register
Register JSON-RPC handlers directly without implementing aJsonRpcService.- Parameters:
pathPattern- the path patternhandlers- the handlers- Returns:
- this builder
-
register
Register a single JSON-RPC handler for a method and path pattern.- Parameters:
pathPattern- the path patternmethod- the method namehandler- the handler- Returns:
- this builder
-