Package io.vertx.grpc.server
Interface ServiceBuilder
-
public interface ServiceBuilder
A builder for creating and configuring aService
. This interface allows you to bind service methods to their respective handlers, which define how requests to those methods are processed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <Req,Resp>
ServiceBuilderbind(ServiceMethod<Req,Resp> serviceMethod, Handler<GrpcServerRequest<Req,Resp>> handler)
Bind a service method call handler that handles any call made to the server for thefullMethodName
method.Service
build()
Constructs and returns aService
instance based on the current configuration of the builder.
-
-
-
Method Detail
-
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 thefullMethodName
method.- Parameters:
handler
- the service method call handlerserviceMethod
- the service method- Returns:
- a reference to this, so the API can be used fluently
-
-