Interface ServiceContainer
- All Known Subinterfaces:
GrpcIoServer, GrpcServer
public interface ServiceContainer
A contract for registering gRPC service method handlers, without requiring
a specific transport.
Generated gRPC service stubs use this interface as their binding abstraction,
allowing them to work with any implementation - HTTP/2 via GrpcServer, event bus, etc.
-
Method Summary
Modifier and TypeMethodDescriptionaddService(Service service) Add a service to this server.services()Get a list of all services registered with this server.
-
Method Details
-
addService
Add a service to this server.- Parameters:
service- the service to add- Returns:
- a reference to this, so the API can be used fluently
- Throws:
IllegalStateException- if a service with the same name is already registered
-
services
-