Package io.grpc
Class HandlerRegistry
- java.lang.Object
-
- io.grpc.HandlerRegistry
-
- Direct Known Subclasses:
MutableHandlerRegistry
@ThreadSafe public abstract class HandlerRegistry extends java.lang.ObjectRegistry of services and their methods used by servers to dispatching incoming calls.
-
-
Constructor Summary
Constructors Constructor Description HandlerRegistry()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.List<ServerServiceDefinition>getServices()Returns theServerServiceDefinitions provided by the registry, or an empty list if not supported by the implementation.ServerMethodDefinition<?,?>lookupMethod(java.lang.String methodName)Lookup aServerMethodDefinitionby its fully-qualified name.abstract ServerMethodDefinition<?,?>lookupMethod(java.lang.String methodName, java.lang.String authority)Lookup aServerMethodDefinitionby its fully-qualified name.
-
-
-
Method Detail
-
getServices
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222") public java.util.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(java.lang.String methodName, @Nullable java.lang.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
@Nullable public final ServerMethodDefinition<?,?> lookupMethod(java.lang.String methodName)
Lookup aServerMethodDefinitionby its fully-qualified name.- Parameters:
methodName- to lookupServerMethodDefinitionfor.- Returns:
- the resolved method or
nullif no method for that name exists.
-
-