@java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver<Req> invoke( io.grpc.stub.StreamObserver<Resp> responseObserver) { switch (methodId) { case METHODID_FULL_DUPLEX_CALL: io.vertx.grpc.GrpcReadStream<io.vertx.example.grpc.Messages.StreamingOutputCallRequest> request0 = io.vertx.grpc.GrpcReadStream.<io.vertx.example.grpc.Messages.StreamingOutputCallRequest>create(); serviceImpl.fullDuplexCall( io.vertx.grpc.GrpcBidiExchange.<io.vertx.example.grpc.Messages.StreamingOutputCallRequest, io.vertx.example.grpc.Messages.StreamingOutputCallResponse>create( request0, (io.grpc.stub.StreamObserver<io.vertx.example.grpc.Messages.StreamingOutputCallResponse>) responseObserver)); return (io.grpc.stub.StreamObserver<Req>) request0.readObserver(); default: throw new AssertionError(); } } }
/** * <pre> * A Bidirectional streaming RPC. * Accepts a stream of RouteNotes sent while a route is being traversed, * while receiving other RouteNotes (e.g. from other users). * </pre> */ public void routeChat(io.vertx.core.Handler< io.vertx.grpc.GrpcBidiExchange<io.grpc.examples.routeguide.RouteNote, io.grpc.examples.routeguide.RouteNote>> handler) { final io.vertx.grpc.GrpcReadStream<io.grpc.examples.routeguide.RouteNote> readStream = io.vertx.grpc.GrpcReadStream.<io.grpc.examples.routeguide.RouteNote>create(); handler.handle(io.vertx.grpc.GrpcBidiExchange.create(readStream, asyncBidiStreamingCall( getChannel().newCall(getRouteChatMethod(), getCallOptions()), readStream.readObserver()))); } }
/** * <pre> * A sequence of requests with each request served by the server immediately. * As one request could lead to multiple responses, this interface * demonstrates the idea of full duplexing. * </pre> */ public void fullDuplexCall(io.vertx.core.Handler< io.vertx.grpc.GrpcBidiExchange<io.vertx.example.grpc.Messages.StreamingOutputCallResponse, io.vertx.example.grpc.Messages.StreamingOutputCallRequest>> handler) { final io.vertx.grpc.GrpcReadStream<io.vertx.example.grpc.Messages.StreamingOutputCallResponse> readStream = io.vertx.grpc.GrpcReadStream.<io.vertx.example.grpc.Messages.StreamingOutputCallResponse>create(); handler.handle(io.vertx.grpc.GrpcBidiExchange.create(readStream, asyncBidiStreamingCall( getChannel().newCall(getFullDuplexCallMethod(), getCallOptions()), readStream.readObserver()))); } }
@java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver<Req> invoke( io.grpc.stub.StreamObserver<Resp> responseObserver) { switch (methodId) { case METHODID_RECORD_ROUTE: io.vertx.grpc.GrpcReadStream<io.grpc.examples.routeguide.Point> request2 = io.vertx.grpc.GrpcReadStream.<io.grpc.examples.routeguide.Point>create(); serviceImpl.recordRoute(request2, (io.vertx.core.Future<io.grpc.examples.routeguide.RouteSummary>) io.vertx.core.Future.<io.grpc.examples.routeguide.RouteSummary>future().setHandler(ar -> { if (ar.succeeded()) { ((io.grpc.stub.StreamObserver<io.grpc.examples.routeguide.RouteSummary>) responseObserver).onNext(ar.result()); responseObserver.onCompleted(); } else { responseObserver.onError(ar.cause()); } })); return (io.grpc.stub.StreamObserver<Req>) request2.readObserver(); case METHODID_ROUTE_CHAT: io.vertx.grpc.GrpcReadStream<io.grpc.examples.routeguide.RouteNote> request3 = io.vertx.grpc.GrpcReadStream.<io.grpc.examples.routeguide.RouteNote>create(); serviceImpl.routeChat( io.vertx.grpc.GrpcBidiExchange.<io.grpc.examples.routeguide.RouteNote, io.grpc.examples.routeguide.RouteNote>create( request3, (io.grpc.stub.StreamObserver<io.grpc.examples.routeguide.RouteNote>) responseObserver)); return (io.grpc.stub.StreamObserver<Req>) request3.readObserver(); default: throw new AssertionError(); } } }
@java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver<Req> invoke( io.grpc.stub.StreamObserver<Resp> responseObserver) { switch (methodId) { case METHODID_INPUT_CALL: io.vertx.grpc.GrpcReadStream<io.vertx.tp.ipc.eon.StreamClientRequest> request0 = io.vertx.grpc.GrpcReadStream.<io.vertx.tp.ipc.eon.StreamClientRequest>create(); serviceImpl.inputCall( io.vertx.grpc.GrpcBidiExchange.<io.vertx.tp.ipc.eon.StreamClientRequest, io.vertx.tp.ipc.eon.StreamClientResponse>create( request0, (io.grpc.stub.StreamObserver<io.vertx.tp.ipc.eon.StreamClientResponse>) responseObserver)); return (io.grpc.stub.StreamObserver<Req>) request0.readObserver(); default: throw new AssertionError(); } } }
@java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver<Req> invoke( io.grpc.stub.StreamObserver<Resp> responseObserver) { switch (methodId) { case METHODID_OUTPUT_CALL: io.vertx.grpc.GrpcReadStream<io.vertx.tp.ipc.eon.StreamServerRequest> request0 = io.vertx.grpc.GrpcReadStream.<io.vertx.tp.ipc.eon.StreamServerRequest>create(); serviceImpl.outputCall( io.vertx.grpc.GrpcBidiExchange.<io.vertx.tp.ipc.eon.StreamServerRequest, io.vertx.tp.ipc.eon.StreamServerResponse>create( request0, (io.grpc.stub.StreamObserver<io.vertx.tp.ipc.eon.StreamServerResponse>) responseObserver)); return (io.grpc.stub.StreamObserver<Req>) request0.readObserver(); default: throw new AssertionError(); } } }
@java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver<Req> invoke( io.grpc.stub.StreamObserver<Resp> responseObserver) { switch (methodId) { case METHODID_DUPLIEX_CALL: io.vertx.grpc.GrpcReadStream<io.vertx.tp.ipc.eon.StreamClientRequest> request0 = io.vertx.grpc.GrpcReadStream.<io.vertx.tp.ipc.eon.StreamClientRequest>create(); serviceImpl.dupliexCall( io.vertx.grpc.GrpcBidiExchange.<io.vertx.tp.ipc.eon.StreamClientRequest, io.vertx.tp.ipc.eon.StreamServerResponse>create( request0, (io.grpc.stub.StreamObserver<io.vertx.tp.ipc.eon.StreamServerResponse>) responseObserver)); return (io.grpc.stub.StreamObserver<Req>) request0.readObserver(); default: throw new AssertionError(); } } }
/** * <pre> * Server -> Client * </pre> */ public void outputCall(io.vertx.core.Handler< io.vertx.grpc.GrpcBidiExchange<io.vertx.tp.ipc.eon.StreamServerResponse, io.vertx.tp.ipc.eon.StreamServerRequest>> handler) { final io.vertx.grpc.GrpcReadStream<io.vertx.tp.ipc.eon.StreamServerResponse> readStream = io.vertx.grpc.GrpcReadStream.<io.vertx.tp.ipc.eon.StreamServerResponse>create(); handler.handle(io.vertx.grpc.GrpcBidiExchange.create(readStream, asyncBidiStreamingCall( getChannel().newCall(METHOD_OUTPUT_CALL, getCallOptions()), readStream.readObserver()))); } }
/** * <pre> * Full: Client -> Server -> Client * </pre> */ public void dupliexCall(io.vertx.core.Handler< io.vertx.grpc.GrpcBidiExchange<io.vertx.tp.ipc.eon.StreamServerResponse, io.vertx.tp.ipc.eon.StreamClientRequest>> handler) { final io.vertx.grpc.GrpcReadStream<io.vertx.tp.ipc.eon.StreamServerResponse> readStream = io.vertx.grpc.GrpcReadStream.<io.vertx.tp.ipc.eon.StreamServerResponse>create(); handler.handle(io.vertx.grpc.GrpcBidiExchange.create(readStream, asyncBidiStreamingCall( getChannel().newCall(METHOD_DUPLIEX_CALL, getCallOptions()), readStream.readObserver()))); } }
/** * <pre> * Client -> Server * </pre> */ public void inputCall(io.vertx.core.Handler< io.vertx.grpc.GrpcBidiExchange<io.vertx.tp.ipc.eon.StreamClientResponse, io.vertx.tp.ipc.eon.StreamClientRequest>> handler) { final io.vertx.grpc.GrpcReadStream<io.vertx.tp.ipc.eon.StreamClientResponse> readStream = io.vertx.grpc.GrpcReadStream.<io.vertx.tp.ipc.eon.StreamClientResponse>create(); handler.handle(io.vertx.grpc.GrpcBidiExchange.create(readStream, asyncBidiStreamingCall( getChannel().newCall(METHOD_INPUT_CALL, getCallOptions()), readStream.readObserver()))); } }
/** */ public void pipe(io.vertx.core.Handler< io.vertx.grpc.GrpcBidiExchange<io.grpc.examples.streaming.Item, io.grpc.examples.streaming.Item>> handler) { final io.vertx.grpc.GrpcReadStream<io.grpc.examples.streaming.Item> readStream = io.vertx.grpc.GrpcReadStream.<io.grpc.examples.streaming.Item>create(); handler.handle(io.vertx.grpc.GrpcBidiExchange.create(readStream, asyncBidiStreamingCall( getChannel().newCall(getPipeMethod(), getCallOptions()), readStream.readObserver()))); } }
/** * <pre> * A sequence of requests followed by a sequence of responses. * The server buffers all the client requests and then serves them in order. A * stream of responses are returned to the client when the server starts with * first request. * </pre> */ public void halfDuplexCall(io.vertx.core.Handler< io.vertx.grpc.GrpcBidiExchange<io.grpc.testing.integration.Messages.StreamingOutputCallResponse, io.grpc.testing.integration.Messages.StreamingOutputCallRequest>> handler) { final io.vertx.grpc.GrpcReadStream<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> readStream = io.vertx.grpc.GrpcReadStream.<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>create(); handler.handle(io.vertx.grpc.GrpcBidiExchange.create(readStream, asyncBidiStreamingCall( getChannel().newCall(getHalfDuplexCallMethod(), getCallOptions()), readStream.readObserver()))); }
/** * <pre> * A sequence of requests with each request served by the server immediately. * As one request could lead to multiple responses, this interface * demonstrates the idea of full duplexing. * </pre> */ public void fullDuplexCall(io.vertx.core.Handler< io.vertx.grpc.GrpcBidiExchange<io.grpc.testing.integration.Messages.StreamingOutputCallResponse, io.grpc.testing.integration.Messages.StreamingOutputCallRequest>> handler) { final io.vertx.grpc.GrpcReadStream<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> readStream = io.vertx.grpc.GrpcReadStream.<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>create(); handler.handle(io.vertx.grpc.GrpcBidiExchange.create(readStream, asyncBidiStreamingCall( getChannel().newCall(getFullDuplexCallMethod(), getCallOptions()), readStream.readObserver()))); }
@java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver<Req> invoke( io.grpc.stub.StreamObserver<Resp> responseObserver) { switch (methodId) { case METHODID_SINK: io.vertx.grpc.GrpcReadStream<io.grpc.examples.streaming.Item> request1 = io.vertx.grpc.GrpcReadStream.<io.grpc.examples.streaming.Item>create(); serviceImpl.sink(request1, (io.vertx.core.Future<io.grpc.examples.streaming.Empty>) io.vertx.core.Future.<io.grpc.examples.streaming.Empty>future().setHandler(ar -> { if (ar.succeeded()) { ((io.grpc.stub.StreamObserver<io.grpc.examples.streaming.Empty>) responseObserver).onNext(ar.result()); responseObserver.onCompleted(); } else { responseObserver.onError(ar.cause()); } })); return (io.grpc.stub.StreamObserver<Req>) request1.readObserver(); case METHODID_PIPE: io.vertx.grpc.GrpcReadStream<io.grpc.examples.streaming.Item> request2 = io.vertx.grpc.GrpcReadStream.<io.grpc.examples.streaming.Item>create(); serviceImpl.pipe( io.vertx.grpc.GrpcBidiExchange.<io.grpc.examples.streaming.Item, io.grpc.examples.streaming.Item>create( request2, (io.grpc.stub.StreamObserver<io.grpc.examples.streaming.Item>) responseObserver)); return (io.grpc.stub.StreamObserver<Req>) request2.readObserver(); default: throw new AssertionError(); } } }
io.vertx.grpc.GrpcReadStream<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> request4 = io.vertx.grpc.GrpcReadStream.<io.grpc.testing.integration.Messages.StreamingOutputCallRequest>create(); serviceImpl.fullDuplexCall( io.vertx.grpc.GrpcBidiExchange.<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>create( request4, (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>) responseObserver)); io.vertx.grpc.GrpcReadStream<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> request5 = io.vertx.grpc.GrpcReadStream.<io.grpc.testing.integration.Messages.StreamingOutputCallRequest>create(); serviceImpl.halfDuplexCall( io.vertx.grpc.GrpcBidiExchange.<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>create( request5, (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>) responseObserver));