Package io.grpc
Class HandlerRegistry
- java.lang.Object
-
- io.grpc.HandlerRegistry
-
- Direct Known Subclasses:
MutableHandlerRegistry
@ThreadSafe public abstract class HandlerRegistry extends Object
Registry 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 List<ServerServiceDefinition>
getServices()
Returns theServerServiceDefinition
s provided by the registry, or an empty list if not supported by the implementation.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.
-
-
-
Method Detail
-
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
@Nullable public final ServerMethodDefinition<?,?> lookupMethod(String methodName)
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.
-
-