@ThreadSafe public final class MutableHandlerRegistryImpl extends MutableHandlerRegistry
MutableHandlerRegistry
.
Uses ConcurrentHashMap
to avoid service registration excessively
blocking method lookup.
HandlerRegistry.Method
Constructor and Description |
---|
MutableHandlerRegistryImpl() |
Modifier and Type | Method and Description |
---|---|
ServerServiceDefinition |
addService(ServerServiceDefinition service)
Returns
null , or previous service if service replaced an existing service. |
HandlerRegistry.Method |
lookupMethod(String methodName)
Lookup a
HandlerRegistry.Method by its fully-qualified name. |
boolean |
removeService(ServerServiceDefinition service)
Returns
false if service was not registered. |
@Nullable public ServerServiceDefinition addService(ServerServiceDefinition service)
MutableHandlerRegistry
null
, or previous service if service
replaced an existing service.addService
in class MutableHandlerRegistry
public boolean removeService(ServerServiceDefinition service)
MutableHandlerRegistry
false
if service
was not registered.removeService
in class MutableHandlerRegistry
@Nullable public HandlerRegistry.Method lookupMethod(String methodName)
HandlerRegistry
HandlerRegistry.Method
by its fully-qualified name. All names are expected to be absolute
paths that start with '/'.lookupMethod
in class HandlerRegistry
methodName
- to lookup HandlerRegistry.Method
for.null
if no method for that name exists.