Service - Type for servicepublic abstract class GrpcServiceFactory<Service extends GrpcService>
extends Object
GrpcServiceFactory.ServerBinder.| Modifier and Type | Class and Description |
|---|---|
static interface |
GrpcServiceFactory.ServerBinder
A utility to bind an HTTP service for gRPC with an
appropriate programming model.
|
| Modifier | Constructor and Description |
|---|---|
protected |
GrpcServiceFactory(GrpcRoutes<Service> routes)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Single<GrpcServerContext> |
bind(GrpcServiceFactory.ServerBinder binder,
ExecutionContext<?> executionContext)
Use the passed
GrpcServiceFactory.ServerBinder to bind an appropriate
gRPC service for the server. |
static GrpcServiceFactory<?> |
merge(GrpcServiceFactory<?>... factories)
Merges multiple
factories into a single instance. |
protected GrpcServiceFactory(GrpcRoutes<Service> routes)
routes - GrpcRoutes that will hold the routes for the constructed service.public static GrpcServiceFactory<?> merge(GrpcServiceFactory<?>... factories)
factories into a single instance.factories - instanes of GrpcServiceFactory to merge.GrpcServiceFactory.public final Single<GrpcServerContext> bind(GrpcServiceFactory.ServerBinder binder, ExecutionContext<?> executionContext)
GrpcServiceFactory.ServerBinder to bind an appropriate
gRPC service for the server.binder - GrpcServiceFactory.ServerBinder to bind gRPC service to the server.executionContext - ExecutionContext to use for the service.Single that completes when the server is successfully started or terminates with an error if
the server could not be started.