Package io.grpc
Class HandlerRegistry
java.lang.Object
io.grpc.HandlerRegistry
- Direct Known Subclasses:
MutableHandlerRegistry
Registry of services and their methods used by servers to dispatching incoming calls.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns theServerServiceDefinition
s provided by the registry, or an empty list if not supported by the implementation.final ServerMethodDefinition
<?, ?> lookupMethod
(String methodName) Lookup aServerMethodDefinition
by its fully-qualified name.abstract ServerMethodDefinition
<?, ?> lookupMethod
(String methodName, String authority) Lookup aServerMethodDefinition
by its fully-qualified name.
-
Constructor Details
-
HandlerRegistry
public HandlerRegistry()
-
-
Method Details
-
getServices
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222") public List<ServerServiceDefinition> getServices()Returns theServerServiceDefinition
s provided by the registry, or an empty list if not supported by the implementation. -
lookupMethod
@Nullable public abstract ServerMethodDefinition<?,?> lookupMethod(String methodName, @Nullable String authority) Lookup aServerMethodDefinition
by its fully-qualified name.- Parameters:
methodName
- to lookupServerMethodDefinition
for.authority
- the authority for the desired method (to do virtual hosting). Ifnull
the first matching method will be returned.- Returns:
- the resolved method or
null
if no method for that name exists.
-
lookupMethod
Lookup aServerMethodDefinition
by its fully-qualified name.- Parameters:
methodName
- to lookupServerMethodDefinition
for.- Returns:
- the resolved method or
null
if no method for that name exists.
-