Interface ServiceBuilder
public interface ServiceBuilder
A builder for creating and configuring a
Service. This interface allows you to bind
service methods to their respective handlers, which define how requests to those methods
are processed.-
Method Summary
Modifier and TypeMethodDescription<Req,Resp> ServiceBuilder bind(ServiceMethod<Req, Resp> serviceMethod, Handler<GrpcServerRequest<Req, Resp>> handler) Bind a service method call handler that handles any call made to the server for thefullMethodNamemethod.build()Constructs and returns aServiceinstance based on the current configuration of the builder.
-
Method Details
-
bind
<Req,Resp> ServiceBuilder bind(ServiceMethod<Req, Resp> serviceMethod, Handler<GrpcServerRequest<Req, Resp>> handler) Bind a service method call handler that handles any call made to the server for thefullMethodNamemethod.- Parameters:
serviceMethod- the service methodhandler- the service method call handler- Returns:
- a reference to this, so the API can be used fluently
-
build
-