Package io.vertx.grpcio.server
Interface GrpcIoServer
-
- All Superinterfaces:
GrpcServer,Handler<HttpServerRequest>
public interface GrpcIoServer extends GrpcServer
A gRPC server based on Vert.x HTTP server. This server extends theGrpcServerto encode/decode messages in protobuf format usingMethodDescriptor. This server exposes 2 levels of handlers- a Protobuf message
handler:GrpcServerRequest/GrpcServerResponsewith Protobuf message that handles any method call in a generic way - a gRPC message
handler:GrpcServerRequest/GrpcServerRequestwith gRPC messages that handles specific service method calls
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default GrpcIoServeraddService(BindableService bindableService)LikeGrpcServer.addService(Service)with a gRPC/IOBindableService.<Req,Resp>
GrpcIoServercallHandler(MethodDescriptor<Req,Resp> methodDesc, Handler<GrpcServerRequest<Req,Resp>> handler)Set a service method call handler that handles any call made to the server for theMethodDescriptorservice method.GrpcIoServercallHandler(Handler<GrpcServerRequest<Buffer,Buffer>> handler)Set a call handler that handles any call made to the server.static GrpcIoServerserver(Vertx vertx)Create a blank gRPC server with default options.static GrpcIoServerserver(Vertx vertx, GrpcServerOptions options)Create a blank gRPC server with specified options.-
Methods inherited from interface io.vertx.grpc.server.GrpcServer
addService, callHandler, services
-
-
-
-
Method Detail
-
server
static GrpcIoServer server(Vertx vertx)
Create a blank gRPC server with default options.- Returns:
- the created server
-
server
static GrpcIoServer server(Vertx vertx, GrpcServerOptions options)
Create a blank gRPC server with specified options.- Parameters:
options- the gRPC server options- Returns:
- the created server
-
callHandler
GrpcIoServer callHandler(Handler<GrpcServerRequest<Buffer,Buffer>> handler)
Description copied from interface:GrpcServerSet a call handler that handles any call made to the server.- Specified by:
callHandlerin interfaceGrpcServer- Parameters:
handler- the service method call handler- Returns:
- a reference to this, so the API can be used fluently
-
callHandler
<Req,Resp> GrpcIoServer callHandler(MethodDescriptor<Req,Resp> methodDesc, Handler<GrpcServerRequest<Req,Resp>> handler)
Set a service method call handler that handles any call made to the server for theMethodDescriptorservice method.- Parameters:
handler- the service method call handler- Returns:
- a reference to this, so the API can be used fluently
-
addService
default GrpcIoServer addService(BindableService bindableService)
LikeGrpcServer.addService(Service)with a gRPC/IOBindableService.
-
-