- All Known Implementing Classes:
GrpcRoutingImpl
public interface GrpcRouting
GrpcRouting represents the composition of gRPC services with interceptors and routing rules.
It is together with
GrpcServerConfiguration.Builder a cornerstone of the GrpcServer.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder that can buildGrpcRoutinginstances. -
Method Summary
Modifier and TypeMethodDescriptionstatic GrpcRouting.Builderbuilder()Obtain a GrpcRouting builder.default GrpcServerCreates newGrpcServerinstance with this routing and default configuration.default GrpcServercreateServer(GrpcServerConfiguration configuration) Creates newGrpcServerinstance with provided configuration and this routing.PriorityBag<io.grpc.ServerInterceptor>Obtain aListof the globalinterceptorsthat should be applied to all services.services()
-
Method Details
-
services
List<ServiceDescriptor> services()- Returns:
- a
Listof theServiceDescriptorinstances contained in thisGrpcRouting
-
interceptors
PriorityBag<io.grpc.ServerInterceptor> interceptors()Obtain aListof the globalinterceptorsthat should be applied to all services.- Returns:
- a
Listof the globalinterceptorsthat should be applied to all services
-
builder
Obtain a GrpcRouting builder.- Returns:
- a GrpcRouting builder
-
createServer
Creates newGrpcServerinstance with provided configuration and this routing.- Parameters:
configuration- a gRPC server configuration- Returns:
- new
GrpcServerinstance - Throws:
IllegalStateException- if none SPI implementation found
-
createServer
Creates newGrpcServerinstance with this routing and default configuration.- Returns:
- new
GrpcServerinstance - Throws:
IllegalStateException- if none SPI implementation found
-