Skip to content

Commit 1d20892

Browse files
committed
more
1 parent 50b88c2 commit 1d20892

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

vertx-grpc-docs/src/main/java/examples/grpc/StreamingClient.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,26 @@ static StreamingClient create(GrpcClient client, SocketAddress host, io.vertx.gr
137137
@io.vertx.codegen.annotations.GenIgnore(io.vertx.codegen.annotations.GenIgnore.PERMITTED_TYPE)
138138
Future<examples.grpc.Empty> sink(ReadStream<examples.grpc.Item> streamOfMessages);
139139

140+
/**
141+
* Calls the Sink RPC service method.
142+
*
143+
* @param streamOfMessages a stream of messages to be sent to the service
144+
* @return a future of the examples.grpc.Empty response message
145+
*/
146+
@io.vertx.codegen.annotations.GenIgnore
147+
default examples.grpc.Empty sink_sync(java.util.List<examples.grpc.Item> streamOfMessages) {
148+
return sink_sync(streamOfMessages.iterator());
149+
}
150+
151+
/**
152+
* Calls the Sink RPC service method.
153+
*
154+
* @param streamOfMessages a stream of messages to be sent to the service
155+
* @return a future of the examples.grpc.Empty response message
156+
*/
157+
@io.vertx.codegen.annotations.GenIgnore
158+
examples.grpc.Empty sink_sync(java.util.Iterator<examples.grpc.Item> streamOfMessages);
159+
140160
/**
141161
* Calls the Pipe RPC service method.
142162
*
@@ -257,6 +277,10 @@ public Future<examples.grpc.Empty> sink(ReadStream<examples.grpc.Item> request)
257277
});
258278
}
259279

280+
public examples.grpc.Empty sink_sync(java.util.Iterator<examples.grpc.Item> request) {
281+
throw new UnsupportedOperationException();
282+
}
283+
260284
public Future<ReadStream<examples.grpc.Item>> pipe(Completable<WriteStream<examples.grpc.Item>> completable) {
261285
ServiceMethod<examples.grpc.Item, examples.grpc.Item> serviceMethod;
262286
switch (wireFormat) {

vertx-grpc-protoc-plugin2/src/main/resources/client.mustache

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,26 @@ public interface {{className}} {
121121
*/
122122
@io.vertx.codegen.annotations.GenIgnore(io.vertx.codegen.annotations.GenIgnore.PERMITTED_TYPE)
123123
Future<{{outputType}}> {{vertxMethodName}}(ReadStream<{{inputType}}> streamOfMessages);
124+
125+
/**
126+
* Calls the {{methodName}} RPC service method.
127+
*
128+
* @param streamOfMessages a stream of messages to be sent to the service
129+
* @return a future of the {{outputType}} response message
130+
*/
131+
@io.vertx.codegen.annotations.GenIgnore
132+
default {{outputType}} {{vertxMethodName}}_sync(java.util.List<{{inputType}}> streamOfMessages) {
133+
return {{vertxMethodName}}_sync(streamOfMessages.iterator());
134+
}
135+
136+
/**
137+
* Calls the {{methodName}} RPC service method.
138+
*
139+
* @param streamOfMessages a stream of messages to be sent to the service
140+
* @return a future of the {{outputType}} response message
141+
*/
142+
@io.vertx.codegen.annotations.GenIgnore
143+
{{outputType}} {{vertxMethodName}}_sync(java.util.Iterator<{{inputType}}> streamOfMessages);
124144
{{/manyUnaryMethods}}
125145
{{#manyManyMethods}}
126146

@@ -271,6 +291,10 @@ class {{className}}Impl implements {{className}} {
271291
}
272292
});
273293
}
294+
295+
public {{outputType}} {{vertxMethodName}}_sync(java.util.Iterator<{{inputType}}> request) {
296+
throw new UnsupportedOperationException();
297+
}
274298
{{/manyUnaryMethods}}
275299
{{#manyManyMethods}}
276300

0 commit comments

Comments
 (0)