-
- All Known Implementing Classes:
GrpcRoutingImpl
public interface GrpcRouting
GrpcRouting represents the composition of gRPC services with interceptors and routing rules. It is together withGrpcServerConfiguration.Builder
a cornerstone of theGrpcServer
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
GrpcRouting.Builder
A builder that can buildGrpcRouting
instances.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static GrpcRouting.Builder
builder()
Obtain a GrpcRouting builder.default GrpcServer
createServer()
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>
interceptors()
Obtain aList
of the globalinterceptors
that should be applied to all services.List<ServiceDescriptor>
services()
-
-
-
Method Detail
-
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
static GrpcRouting.Builder builder()
Obtain a GrpcRouting builder.- Returns:
- a GrpcRouting builder
-
createServer
default GrpcServer createServer(GrpcServerConfiguration configuration)
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
default GrpcServer createServer()
Creates newGrpcServer
instance with this routing and default configuration.- Returns:
- new
GrpcServer
instance - Throws:
IllegalStateException
- if none SPI implementation found
-
-