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 classInternalHandlerRegistry.Builder
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,ServerMethodDefinition<?,?>>methodsprivate java.util.List<ServerServiceDefinition>services
-
Constructor Summary
Constructors Modifier Constructor Description privateInternalHandlerRegistry(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 aServerMethodDefinitionby 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:
getServicesin classHandlerRegistry
-
lookupMethod
@Nullable public ServerMethodDefinition<?,?> lookupMethod(java.lang.String methodName, @Nullable java.lang.String authority)
Description copied from class:HandlerRegistryLookup aServerMethodDefinitionby its fully-qualified name.- Specified by:
lookupMethodin classHandlerRegistry- 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.
-
-