Interface GrpcServerFactory
- All Known Implementing Classes:
DefaultGrpcServerFactory, InProcessGrpcServerFactory, NettyGrpcServerFactory, ShadedNettyGrpcServerFactory
public interface GrpcServerFactory
Factory interface that can be used to create a
gRPC Server.- Author:
- David Syer, Chris Bono
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddService(io.grpc.ServerServiceDefinition service) Adds a service definition to the server.io.grpc.ServerGets a new fully configured but not startedServerinstance.default booleansupports(io.grpc.ServerInterceptor interceptor, io.grpc.ServerServiceDefinition service)
-
Method Details
-
createServer
io.grpc.Server createServer()Gets a new fully configured but not startedServerinstance. Clients should not be able to connect to the returned server untilServer.start()is called (which happens when theGrpcServerLifecycleis started).- Returns:
- a fully configured not started
Serveror null if the server has no lifecycle - See Also:
-
addService
void addService(io.grpc.ServerServiceDefinition service) Adds a service definition to the server. Must be called prior toServer.start().- Parameters:
service- the service definition to add
-
supports
default boolean supports(io.grpc.ServerInterceptor interceptor, io.grpc.ServerServiceDefinition service)
-