Package io.grpc.protobuf.services
Class ProtoReflectionServiceV1.ServerReflectionIndex
- java.lang.Object
-
- io.grpc.protobuf.services.ProtoReflectionServiceV1.ServerReflectionIndex
-
- Enclosing class:
- ProtoReflectionServiceV1
private static final class ProtoReflectionServiceV1.ServerReflectionIndex extends java.lang.Object
Indexes the server's services and allows lookups of file descriptors by filename, symbol, type, and extension number.Internally, this stores separate indices for the immutable and mutable services. When queried, the immutable service index is checked for a matching value. Only if there is no match in the immutable service index are the mutable services checked.
-
-
Field Summary
Fields Modifier and Type Field Description private ProtoReflectionServiceV1.FileDescriptorIndex
immutableServicesIndex
private ProtoReflectionServiceV1.FileDescriptorIndex
mutableServicesIndex
-
Constructor Summary
Constructors Constructor Description ServerReflectionIndex(java.util.List<ServerServiceDefinition> immutableServices, java.util.List<ServerServiceDefinition> mutableServices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.Set<java.lang.Integer>
getExtensionNumbersOfType(java.lang.String type)
private com.google.protobuf.Descriptors.FileDescriptor
getFileDescriptorByExtensionAndNumber(java.lang.String type, int extension)
private com.google.protobuf.Descriptors.FileDescriptor
getFileDescriptorByName(java.lang.String name)
private com.google.protobuf.Descriptors.FileDescriptor
getFileDescriptorBySymbol(java.lang.String symbol)
private ProtoReflectionServiceV1.FileDescriptorIndex
getMutableServicesIndex()
private java.util.Set<java.lang.String>
getServiceNames()
-
-
-
Field Detail
-
immutableServicesIndex
private final ProtoReflectionServiceV1.FileDescriptorIndex immutableServicesIndex
-
mutableServicesIndex
private final ProtoReflectionServiceV1.FileDescriptorIndex mutableServicesIndex
-
-
Constructor Detail
-
ServerReflectionIndex
public ServerReflectionIndex(java.util.List<ServerServiceDefinition> immutableServices, java.util.List<ServerServiceDefinition> mutableServices)
-
-
Method Detail
-
getMutableServicesIndex
private ProtoReflectionServiceV1.FileDescriptorIndex getMutableServicesIndex()
-
getServiceNames
private java.util.Set<java.lang.String> getServiceNames()
-
getFileDescriptorByName
@Nullable private com.google.protobuf.Descriptors.FileDescriptor getFileDescriptorByName(java.lang.String name)
-
getFileDescriptorBySymbol
@Nullable private com.google.protobuf.Descriptors.FileDescriptor getFileDescriptorBySymbol(java.lang.String symbol)
-
getFileDescriptorByExtensionAndNumber
@Nullable private com.google.protobuf.Descriptors.FileDescriptor getFileDescriptorByExtensionAndNumber(java.lang.String type, int extension)
-
getExtensionNumbersOfType
@Nullable private java.util.Set<java.lang.Integer> getExtensionNumbersOfType(java.lang.String type)
-
-