Package io.grpc.internal
Class InternalHandlerRegistry
- java.lang.Object
-
- io.grpc.HandlerRegistry
-
- io.grpc.internal.InternalHandlerRegistry
-
final class InternalHandlerRegistry extends HandlerRegistry
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
InternalHandlerRegistry.Builder
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,ServerMethodDefinition<?,?>>
methods
private java.util.List<ServerServiceDefinition>
services
-
Constructor Summary
Constructors Modifier Constructor Description private
InternalHandlerRegistry(java.util.List<ServerServiceDefinition> services, java.util.Map<java.lang.String,ServerMethodDefinition<?,?>> methods)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ServerServiceDefinition>
getServices()
Returns the service definitions in this registry.ServerMethodDefinition<?,?>
lookupMethod(java.lang.String methodName, java.lang.String authority)
Lookup aServerMethodDefinition
by its fully-qualified name.-
Methods inherited from class io.grpc.HandlerRegistry
lookupMethod
-
-
-
-
Field Detail
-
services
private final java.util.List<ServerServiceDefinition> services
-
methods
private final java.util.Map<java.lang.String,ServerMethodDefinition<?,?>> methods
-
-
Constructor Detail
-
InternalHandlerRegistry
private InternalHandlerRegistry(java.util.List<ServerServiceDefinition> services, java.util.Map<java.lang.String,ServerMethodDefinition<?,?>> methods)
-
-
Method Detail
-
getServices
public java.util.List<ServerServiceDefinition> getServices()
Returns the service definitions in this registry.- Overrides:
getServices
in classHandlerRegistry
-
lookupMethod
@Nullable public ServerMethodDefinition<?,?> lookupMethod(java.lang.String methodName, @Nullable java.lang.String authority)
Description copied from class:HandlerRegistry
Lookup aServerMethodDefinition
by its fully-qualified name.- Specified by:
lookupMethod
in classHandlerRegistry
- 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.
-
-