@ThreadSafe
@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/933")
public final class MutableHandlerRegistry
extends io.grpc.HandlerRegistry
MutableHandlerRegistry.
Uses ConcurrentHashMap to avoid service registration excessively
blocking method lookup.
| Constructor and Description |
|---|
MutableHandlerRegistry() |
| Modifier and Type | Method and Description |
|---|---|
io.grpc.ServerServiceDefinition |
addService(io.grpc.BindableService bindableService)
Registers a service.
|
io.grpc.ServerServiceDefinition |
addService(io.grpc.ServerServiceDefinition service)
Registers a service.
|
java.util.List<io.grpc.ServerServiceDefinition> |
getServices()
Note: This does not necessarily return a consistent view of the map.
|
io.grpc.ServerMethodDefinition<?,?> |
lookupMethod(java.lang.String methodName,
java.lang.String authority)
Note: This does not actually honor the authority provided.
|
boolean |
removeService(io.grpc.ServerServiceDefinition service)
Removes a registered service
|
@Nullable public io.grpc.ServerServiceDefinition addService(io.grpc.ServerServiceDefinition service)
null.@Nullable public io.grpc.ServerServiceDefinition addService(io.grpc.BindableService bindableService)
null.public boolean removeService(io.grpc.ServerServiceDefinition service)
@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/2222") public java.util.List<io.grpc.ServerServiceDefinition> getServices()
getServices in class io.grpc.HandlerRegistry@Nullable
public io.grpc.ServerMethodDefinition<?,?> lookupMethod(java.lang.String methodName,
@Nullable
java.lang.String authority)
lookupMethod in class io.grpc.HandlerRegistry