- 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
Modifier and TypeInterfaceDescriptionstatic final class
A builder that can buildGrpcRouting
instances. -
Method Summary
Modifier and TypeMethodDescriptionstatic GrpcRouting.Builder
builder()
Obtain a GrpcRouting builder.default GrpcServer
Creates newGrpcServer
instance with this routing and default configuration.default GrpcServer
createServer
(GrpcServerConfiguration configuration) Creates newGrpcServer
instance with provided configuration and this routing.PriorityBag<io.grpc.ServerInterceptor>
Obtain aList
of the globalinterceptors
that should be applied to all services.services()
-
Method Details
-
services
List<ServiceDescriptor> services()- Returns:
- a
List
of theServiceDescriptor
instances contained in thisGrpcRouting
-
interceptors
PriorityBag<io.grpc.ServerInterceptor> interceptors()Obtain aList
of the globalinterceptors
that should be applied to all services.- Returns:
- a
List
of the globalinterceptors
that should be applied to all services
-
builder
Obtain a GrpcRouting builder.- Returns:
- a GrpcRouting builder
-
createServer
Creates newGrpcServer
instance with provided configuration and this routing.- Parameters:
configuration
- a gRPC server configuration- Returns:
- new
GrpcServer
instance - Throws:
IllegalStateException
- if none SPI implementation found
-
createServer
Creates newGrpcServer
instance with this routing and default configuration.- Returns:
- new
GrpcServer
instance - Throws:
IllegalStateException
- if none SPI implementation found
-