Package io.grpc
Class HandlerRegistry
java.lang.Object
io.grpc.HandlerRegistry
Registry of services and their methods used by servers to dispatching incoming calls.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns theServerServiceDefinitions provided by the registry, or an empty list if not supported by the implementation.final ServerMethodDefinition<?,?> lookupMethod(String methodName) Lookup aServerMethodDefinitionby its fully-qualified name.abstract ServerMethodDefinition<?,?> lookupMethod(String methodName, String authority) Lookup aServerMethodDefinitionby 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 theServerServiceDefinitions 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 aServerMethodDefinitionby its fully-qualified name.- Parameters:
methodName- to lookupServerMethodDefinitionfor.authority- the authority for the desired method (to do virtual hosting). Ifnullthe first matching method will be returned.- Returns:
- the resolved method or
nullif no method for that name exists.
-
lookupMethod
Lookup aServerMethodDefinitionby its fully-qualified name.- Parameters:
methodName- to lookupServerMethodDefinitionfor.- Returns:
- the resolved method or
nullif no method for that name exists.
-