Interface GrpcServerService
- All Superinterfaces:
NamedService
- All Known Implementing Classes:
GrpcSecurity, GrpcValidation
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Extension that can modify gRPC server behavior.
-
Method Summary
Modifier and TypeMethodDescriptionWeightedBag<io.grpc.ServerInterceptor> Insert a list of server interceptors for a gRPC call.default WeightedBag<io.grpc.ServerInterceptor> interceptors(ServiceRegistry serviceRegistry) Insert a list of server interceptors for a gRPC call, using the provided service registry for dependencies.default Stringname()Name of this implementation, as provided inConfiguredProvider.create(Config, String).default Stringtype()Type of this implementation, to distinguish instances of same type, with differentNamedService.name().
-
Method Details
-
name
Description copied from interface:NamedServiceName of this implementation, as provided inConfiguredProvider.create(Config, String).- Specified by:
namein interfaceNamedService- Returns:
- name of this service
-
type
Description copied from interface:NamedServiceType of this implementation, to distinguish instances of same type, with differentNamedService.name(). Use for exampleConfiguredProvider.configKey()to define the type.- Specified by:
typein interfaceNamedService- Returns:
- type of this service
-
interceptors
WeightedBag<io.grpc.ServerInterceptor> interceptors()Insert a list of server interceptors for a gRPC call.- Returns:
- weighted bag of interceptors
-
interceptors
Insert a list of server interceptors for a gRPC call, using the provided service registry for dependencies. The default implementation validates the registry and delegates tointerceptors(). Implementations that resolve dependencies from the owning registry must override this method.- Parameters:
serviceRegistry- service registry to use for interceptor dependencies- Returns:
- weighted bag of interceptors
-