blob: 9c0ac11de8b4675341a7410f2a884d40a74372b2 [file] [log] [blame]
Xudong Maf7f57b72015-09-24 11:16:07 -07001package io.grpc.testing.integration.nano;
Xiao Hangdcff3152015-02-20 15:03:06 -08002
Kun Zhang2ee4d022015-06-04 16:39:25 -07003import static io.grpc.stub.ClientCalls.asyncUnaryCall;
4import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
5import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -07006import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
Kun Zhang2ee4d022015-06-04 16:39:25 -07007import static io.grpc.stub.ClientCalls.blockingUnaryCall;
8import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
Kun Zhang686dcff2015-07-16 12:34:37 -07009import static io.grpc.stub.ClientCalls.futureUnaryCall;
Kun Zhang042b2782015-08-17 15:43:40 -070010import static io.grpc.MethodDescriptor.generateFullMethodName;
Kun Zhang867c76d2015-07-13 17:15:34 -070011import static io.grpc.stub.ServerCalls.asyncUnaryCall;
12import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
13import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070014import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
Lukasz Strzalkowski2fbf1422016-04-08 02:28:32 +020015import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
16import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
Xiao Hangdcff3152015-02-20 15:03:06 -080017
18import java.io.IOException;
19
nmittler7e8b5042016-04-15 12:52:00 -070020/**
21 * <pre>
22 * Test service that supports all call types.
23 * </pre>
24 */
Carl Mastrangelo72f1e882016-02-29 18:05:33 -080025@javax.annotation.Generated(
Eric Andersone9643bb2016-07-11 16:57:58 -070026 value = "by gRPC proto compiler (version 1.1.0-SNAPSHOT)",
Carl Mastrangelo72f1e882016-02-29 18:05:33 -080027 comments = "Source: test.proto")
Xiao Hangdcff3152015-02-20 15:03:06 -080028public class TestServiceGrpc {
29
Eric Andersonbe0d7e92015-09-10 09:47:17 -070030 private TestServiceGrpc() {}
31
David P. Baker66b984c2015-08-21 13:00:26 -040032 public static final String SERVICE_NAME = "grpc.testing.TestService";
33
Kun Zhang73acc732015-06-26 16:32:05 -070034 // Static method descriptors that strictly reflect the proto.
Eric Anderson1ee336d2015-10-02 20:09:10 -070035 private static final int ARG_IN_METHOD_UNARY_CALL = 0;
36 private static final int ARG_OUT_METHOD_UNARY_CALL = 1;
Eric Anderson7c722e42016-06-07 15:00:29 -070037 @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
Kun Zhangbd23a8d2015-08-28 18:47:06 -070038 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.SimpleRequest,
39 io.grpc.testing.integration.nano.Test.SimpleResponse> METHOD_UNARY_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070040 io.grpc.MethodDescriptor.create(
41 io.grpc.MethodDescriptor.MethodType.UNARY,
Kun Zhang042b2782015-08-17 15:43:40 -070042 generateFullMethodName(
43 "grpc.testing.TestService", "UnaryCall"),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070044 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.SimpleRequest>marshaller(
Eric Anderson1ee336d2015-10-02 20:09:10 -070045 new NanoFactory<io.grpc.testing.integration.nano.Test.SimpleRequest>(ARG_IN_METHOD_UNARY_CALL)),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070046 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.SimpleResponse>marshaller(
Eric Anderson1ee336d2015-10-02 20:09:10 -070047 new NanoFactory<io.grpc.testing.integration.nano.Test.SimpleResponse>(ARG_OUT_METHOD_UNARY_CALL))
48 );
49 private static final int ARG_IN_METHOD_STREAMING_OUTPUT_CALL = 2;
50 private static final int ARG_OUT_METHOD_STREAMING_OUTPUT_CALL = 3;
Eric Anderson7c722e42016-06-07 15:00:29 -070051 @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
Kun Zhangbd23a8d2015-08-28 18:47:06 -070052 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
53 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070054 io.grpc.MethodDescriptor.create(
55 io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -070056 generateFullMethodName(
57 "grpc.testing.TestService", "StreamingOutputCall"),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070058 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller(
Eric Anderson1ee336d2015-10-02 20:09:10 -070059 new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>(ARG_IN_METHOD_STREAMING_OUTPUT_CALL)),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070060 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller(
Eric Anderson1ee336d2015-10-02 20:09:10 -070061 new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>(ARG_OUT_METHOD_STREAMING_OUTPUT_CALL))
62 );
63 private static final int ARG_IN_METHOD_STREAMING_INPUT_CALL = 4;
64 private static final int ARG_OUT_METHOD_STREAMING_INPUT_CALL = 5;
Eric Anderson7c722e42016-06-07 15:00:29 -070065 @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
Kun Zhangbd23a8d2015-08-28 18:47:06 -070066 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest,
67 io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070068 io.grpc.MethodDescriptor.create(
69 io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -070070 generateFullMethodName(
71 "grpc.testing.TestService", "StreamingInputCall"),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070072 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest>marshaller(
Eric Anderson1ee336d2015-10-02 20:09:10 -070073 new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest>(ARG_IN_METHOD_STREAMING_INPUT_CALL)),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070074 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>marshaller(
Eric Anderson1ee336d2015-10-02 20:09:10 -070075 new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>(ARG_OUT_METHOD_STREAMING_INPUT_CALL))
76 );
77 private static final int ARG_IN_METHOD_FULL_BIDI_CALL = 6;
78 private static final int ARG_OUT_METHOD_FULL_BIDI_CALL = 7;
Eric Anderson7c722e42016-06-07 15:00:29 -070079 @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
Kun Zhangbd23a8d2015-08-28 18:47:06 -070080 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
81 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_FULL_BIDI_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070082 io.grpc.MethodDescriptor.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070083 io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -070084 generateFullMethodName(
85 "grpc.testing.TestService", "FullBidiCall"),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070086 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller(
Eric Anderson1ee336d2015-10-02 20:09:10 -070087 new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>(ARG_IN_METHOD_FULL_BIDI_CALL)),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070088 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller(
Eric Anderson1ee336d2015-10-02 20:09:10 -070089 new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>(ARG_OUT_METHOD_FULL_BIDI_CALL))
90 );
91 private static final int ARG_IN_METHOD_HALF_BIDI_CALL = 8;
92 private static final int ARG_OUT_METHOD_HALF_BIDI_CALL = 9;
Eric Anderson7c722e42016-06-07 15:00:29 -070093 @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
Kun Zhangbd23a8d2015-08-28 18:47:06 -070094 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
95 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_HALF_BIDI_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070096 io.grpc.MethodDescriptor.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070097 io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -070098 generateFullMethodName(
99 "grpc.testing.TestService", "HalfBidiCall"),
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700100 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller(
Eric Anderson1ee336d2015-10-02 20:09:10 -0700101 new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>(ARG_IN_METHOD_HALF_BIDI_CALL)),
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700102 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller(
Eric Anderson1ee336d2015-10-02 20:09:10 -0700103 new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>(ARG_OUT_METHOD_HALF_BIDI_CALL))
104 );
105
106 private static final class NanoFactory<T extends com.google.protobuf.nano.MessageNano>
107 implements io.grpc.protobuf.nano.MessageNanoFactory<T> {
108 private final int id;
109
110 NanoFactory(int id) {
111 this.id = id;
112 }
113
Lukasz Strzalkowski2fbf1422016-04-08 02:28:32 +0200114 @java.lang.Override
Eric Anderson1ee336d2015-10-02 20:09:10 -0700115 public T newInstance() {
116 Object o;
117 switch (id) {
118 case ARG_IN_METHOD_UNARY_CALL:
119 o = new io.grpc.testing.integration.nano.Test.SimpleRequest();
120 break;
121 case ARG_OUT_METHOD_UNARY_CALL:
122 o = new io.grpc.testing.integration.nano.Test.SimpleResponse();
123 break;
124 case ARG_IN_METHOD_STREAMING_OUTPUT_CALL:
125 o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest();
126 break;
127 case ARG_OUT_METHOD_STREAMING_OUTPUT_CALL:
128 o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse();
129 break;
130 case ARG_IN_METHOD_STREAMING_INPUT_CALL:
131 o = new io.grpc.testing.integration.nano.Test.StreamingInputCallRequest();
132 break;
133 case ARG_OUT_METHOD_STREAMING_INPUT_CALL:
134 o = new io.grpc.testing.integration.nano.Test.StreamingInputCallResponse();
135 break;
136 case ARG_IN_METHOD_FULL_BIDI_CALL:
137 o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest();
138 break;
139 case ARG_OUT_METHOD_FULL_BIDI_CALL:
140 o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse();
141 break;
142 case ARG_IN_METHOD_HALF_BIDI_CALL:
143 o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest();
144 break;
145 case ARG_OUT_METHOD_HALF_BIDI_CALL:
146 o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse();
147 break;
148 default:
149 throw new AssertionError();
150 }
151 @java.lang.SuppressWarnings("unchecked")
152 T t = (T) o;
153 return t;
154 }
155 }
Xiao Hangdcff3152015-02-20 15:03:06 -0800156
nmittler7e8b5042016-04-15 12:52:00 -0700157 /**
158 * Creates a new async stub that supports all call types for the service
159 */
Xiao Hangdcff3152015-02-20 15:03:06 -0800160 public static TestServiceStub newStub(io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -0700161 return new TestServiceStub(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800162 }
163
nmittler7e8b5042016-04-15 12:52:00 -0700164 /**
165 * Creates a new blocking-style stub that supports unary and streaming output calls on the service
166 */
Xiao Hangdcff3152015-02-20 15:03:06 -0800167 public static TestServiceBlockingStub newBlockingStub(
168 io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -0700169 return new TestServiceBlockingStub(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800170 }
171
nmittler7e8b5042016-04-15 12:52:00 -0700172 /**
173 * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
174 */
Xiao Hangdcff3152015-02-20 15:03:06 -0800175 public static TestServiceFutureStub newFutureStub(
176 io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -0700177 return new TestServiceFutureStub(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800178 }
179
nmittler7e8b5042016-04-15 12:52:00 -0700180 /**
181 * <pre>
182 * Test service that supports all call types.
183 * </pre>
184 */
ZHANG Dapenge1091252016-07-21 16:35:18 -0700185 public static abstract class TestServiceImplBase implements io.grpc.BindableService, TestService {
Xiao Hangdcff3152015-02-20 15:03:06 -0800186
nmittler7e8b5042016-04-15 12:52:00 -0700187 /**
188 * <pre>
189 * One request followed by one response.
190 * The server returns the client payload as-is.
191 * </pre>
192 */
ZHANG Dapenge1091252016-07-21 16:35:18 -0700193 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700194 public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request,
ZHANG Dapenge1091252016-07-21 16:35:18 -0700195 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.SimpleResponse> responseObserver) {
196 asyncUnimplementedUnaryCall(METHOD_UNARY_CALL, responseObserver);
197 }
Xiao Hangdcff3152015-02-20 15:03:06 -0800198
nmittler7e8b5042016-04-15 12:52:00 -0700199 /**
200 * <pre>
201 * One request followed by a sequence of responses (streamed download).
202 * The server returns the payload with client desired type and sizes.
203 * </pre>
204 */
ZHANG Dapenge1091252016-07-21 16:35:18 -0700205 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700206 public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request,
ZHANG Dapenge1091252016-07-21 16:35:18 -0700207 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
208 asyncUnimplementedUnaryCall(METHOD_STREAMING_OUTPUT_CALL, responseObserver);
209 }
Xiao Hangdcff3152015-02-20 15:03:06 -0800210
nmittler7e8b5042016-04-15 12:52:00 -0700211 /**
212 * <pre>
213 * A sequence of requests followed by one response (streamed upload).
214 * The server returns the aggregated size of client payload as the result.
215 * </pre>
216 */
ZHANG Dapenge1091252016-07-21 16:35:18 -0700217 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700218 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest> streamingInputCall(
ZHANG Dapenge1091252016-07-21 16:35:18 -0700219 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> responseObserver) {
220 return asyncUnimplementedStreamingCall(METHOD_STREAMING_INPUT_CALL, responseObserver);
221 }
Xiao Hangdcff3152015-02-20 15:03:06 -0800222
nmittler7e8b5042016-04-15 12:52:00 -0700223 /**
224 * <pre>
225 * A sequence of requests with each request served by the server immediately.
226 * As one request could lead to multiple responses, this interface
227 * demonstrates the idea of full bidirectionality.
228 * </pre>
229 */
ZHANG Dapenge1091252016-07-21 16:35:18 -0700230 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700231 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> fullBidiCall(
ZHANG Dapenge1091252016-07-21 16:35:18 -0700232 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
233 return asyncUnimplementedStreamingCall(METHOD_FULL_BIDI_CALL, responseObserver);
234 }
Xiao Hangdcff3152015-02-20 15:03:06 -0800235
nmittler7e8b5042016-04-15 12:52:00 -0700236 /**
237 * <pre>
238 * A sequence of requests followed by a sequence of responses.
239 * The server buffers all the client requests and then serves them in order. A
240 * stream of responses are returned to the client when the server starts with
241 * first request.
242 * </pre>
243 */
Lukasz Strzalkowski2fbf1422016-04-08 02:28:32 +0200244 @java.lang.Override
245 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> halfBidiCall(
246 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
247 return asyncUnimplementedStreamingCall(METHOD_HALF_BIDI_CALL, responseObserver);
248 }
249
250 @java.lang.Override public io.grpc.ServerServiceDefinition bindService() {
ZHANG Dapenge1091252016-07-21 16:35:18 -0700251 return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
252 .addMethod(
253 METHOD_UNARY_CALL,
254 asyncUnaryCall(
255 new MethodHandlers<
256 io.grpc.testing.integration.nano.Test.SimpleRequest,
257 io.grpc.testing.integration.nano.Test.SimpleResponse>(
258 this, METHODID_UNARY_CALL)))
259 .addMethod(
260 METHOD_STREAMING_OUTPUT_CALL,
261 asyncServerStreamingCall(
262 new MethodHandlers<
263 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
264 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>(
265 this, METHODID_STREAMING_OUTPUT_CALL)))
266 .addMethod(
267 METHOD_STREAMING_INPUT_CALL,
268 asyncClientStreamingCall(
269 new MethodHandlers<
270 io.grpc.testing.integration.nano.Test.StreamingInputCallRequest,
271 io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>(
272 this, METHODID_STREAMING_INPUT_CALL)))
273 .addMethod(
274 METHOD_FULL_BIDI_CALL,
275 asyncBidiStreamingCall(
276 new MethodHandlers<
277 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
278 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>(
279 this, METHODID_FULL_BIDI_CALL)))
280 .addMethod(
281 METHOD_HALF_BIDI_CALL,
282 asyncBidiStreamingCall(
283 new MethodHandlers<
284 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
285 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>(
286 this, METHODID_HALF_BIDI_CALL)))
287 .build();
Lukasz Strzalkowski2fbf1422016-04-08 02:28:32 +0200288 }
289 }
290
nmittler7e8b5042016-04-15 12:52:00 -0700291 /**
292 * <pre>
293 * Test service that supports all call types.
294 * </pre>
295 */
Kun Zhangeb929672015-07-17 17:02:58 -0700296 public static class TestServiceStub extends io.grpc.stub.AbstractStub<TestServiceStub>
Xiao Hangdcff3152015-02-20 15:03:06 -0800297 implements TestService {
Kun Zhangeb929672015-07-17 17:02:58 -0700298 private TestServiceStub(io.grpc.Channel channel) {
299 super(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800300 }
301
Kun Zhangd3c5b002015-06-25 20:24:01 -0700302 private TestServiceStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700303 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700304 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700305 }
306
Xiao Hangdcff3152015-02-20 15:03:06 -0800307 @java.lang.Override
308 protected TestServiceStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700309 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700310 return new TestServiceStub(channel, callOptions);
Xiao Hangdcff3152015-02-20 15:03:06 -0800311 }
312
ZHANG Dapenge1091252016-07-21 16:35:18 -0700313 /**
314 * <pre>
315 * One request followed by one response.
316 * The server returns the client payload as-is.
317 * </pre>
318 */
Xiao Hangdcff3152015-02-20 15:03:06 -0800319 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700320 public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request,
321 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.SimpleResponse> responseObserver) {
Xiao Hangdcff3152015-02-20 15:03:06 -0800322 asyncUnaryCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700323 getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request, responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800324 }
325
ZHANG Dapenge1091252016-07-21 16:35:18 -0700326 /**
327 * <pre>
328 * One request followed by a sequence of responses (streamed download).
329 * The server returns the payload with client desired type and sizes.
330 * </pre>
331 */
Xiao Hangdcff3152015-02-20 15:03:06 -0800332 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700333 public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request,
334 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
Xiao Hangdcff3152015-02-20 15:03:06 -0800335 asyncServerStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700336 getChannel().newCall(METHOD_STREAMING_OUTPUT_CALL, getCallOptions()), request, responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800337 }
338
ZHANG Dapenge1091252016-07-21 16:35:18 -0700339 /**
340 * <pre>
341 * A sequence of requests followed by one response (streamed upload).
342 * The server returns the aggregated size of client payload as the result.
343 * </pre>
344 */
Xiao Hangdcff3152015-02-20 15:03:06 -0800345 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700346 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest> streamingInputCall(
347 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> responseObserver) {
Xiao Hangdcff3152015-02-20 15:03:06 -0800348 return asyncClientStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700349 getChannel().newCall(METHOD_STREAMING_INPUT_CALL, getCallOptions()), responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800350 }
351
ZHANG Dapenge1091252016-07-21 16:35:18 -0700352 /**
353 * <pre>
354 * A sequence of requests with each request served by the server immediately.
355 * As one request could lead to multiple responses, this interface
356 * demonstrates the idea of full bidirectionality.
357 * </pre>
358 */
Xiao Hangdcff3152015-02-20 15:03:06 -0800359 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700360 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> fullBidiCall(
361 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700362 return asyncBidiStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700363 getChannel().newCall(METHOD_FULL_BIDI_CALL, getCallOptions()), responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800364 }
365
ZHANG Dapenge1091252016-07-21 16:35:18 -0700366 /**
367 * <pre>
368 * A sequence of requests followed by a sequence of responses.
369 * The server buffers all the client requests and then serves them in order. A
370 * stream of responses are returned to the client when the server starts with
371 * first request.
372 * </pre>
373 */
Xiao Hangdcff3152015-02-20 15:03:06 -0800374 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700375 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> halfBidiCall(
376 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700377 return asyncBidiStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700378 getChannel().newCall(METHOD_HALF_BIDI_CALL, getCallOptions()), responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800379 }
380 }
381
ZHANG Dapenge1091252016-07-21 16:35:18 -0700382 /**
383 * <pre>
384 * Test service that supports all call types.
385 * </pre>
386 */
Kun Zhangeb929672015-07-17 17:02:58 -0700387 public static class TestServiceBlockingStub extends io.grpc.stub.AbstractStub<TestServiceBlockingStub>
Xiao Hangdcff3152015-02-20 15:03:06 -0800388 implements TestServiceBlockingClient {
Kun Zhangeb929672015-07-17 17:02:58 -0700389 private TestServiceBlockingStub(io.grpc.Channel channel) {
390 super(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800391 }
392
Kun Zhangd3c5b002015-06-25 20:24:01 -0700393 private TestServiceBlockingStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700394 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700395 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700396 }
397
Xiao Hangdcff3152015-02-20 15:03:06 -0800398 @java.lang.Override
399 protected TestServiceBlockingStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700400 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700401 return new TestServiceBlockingStub(channel, callOptions);
Xiao Hangdcff3152015-02-20 15:03:06 -0800402 }
403
ZHANG Dapenge1091252016-07-21 16:35:18 -0700404 /**
405 * <pre>
406 * One request followed by one response.
407 * The server returns the client payload as-is.
408 * </pre>
409 */
Xiao Hangdcff3152015-02-20 15:03:06 -0800410 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700411 public io.grpc.testing.integration.nano.Test.SimpleResponse unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request) {
Xiao Hangdcff3152015-02-20 15:03:06 -0800412 return blockingUnaryCall(
Eric Anderson4168f672015-08-04 16:37:00 -0700413 getChannel(), METHOD_UNARY_CALL, getCallOptions(), request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800414 }
415
ZHANG Dapenge1091252016-07-21 16:35:18 -0700416 /**
417 * <pre>
418 * One request followed by a sequence of responses (streamed download).
419 * The server returns the payload with client desired type and sizes.
420 * </pre>
421 */
Xiao Hangdcff3152015-02-20 15:03:06 -0800422 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700423 public java.util.Iterator<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> streamingOutputCall(
424 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request) {
Xiao Hangdcff3152015-02-20 15:03:06 -0800425 return blockingServerStreamingCall(
Eric Anderson4168f672015-08-04 16:37:00 -0700426 getChannel(), METHOD_STREAMING_OUTPUT_CALL, getCallOptions(), request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800427 }
428 }
429
ZHANG Dapenge1091252016-07-21 16:35:18 -0700430 /**
431 * <pre>
432 * Test service that supports all call types.
433 * </pre>
434 */
Kun Zhangeb929672015-07-17 17:02:58 -0700435 public static class TestServiceFutureStub extends io.grpc.stub.AbstractStub<TestServiceFutureStub>
Xiao Hangdcff3152015-02-20 15:03:06 -0800436 implements TestServiceFutureClient {
Kun Zhangeb929672015-07-17 17:02:58 -0700437 private TestServiceFutureStub(io.grpc.Channel channel) {
438 super(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800439 }
440
Kun Zhangd3c5b002015-06-25 20:24:01 -0700441 private TestServiceFutureStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700442 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700443 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700444 }
445
Xiao Hangdcff3152015-02-20 15:03:06 -0800446 @java.lang.Override
447 protected TestServiceFutureStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700448 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700449 return new TestServiceFutureStub(channel, callOptions);
Xiao Hangdcff3152015-02-20 15:03:06 -0800450 }
451
ZHANG Dapenge1091252016-07-21 16:35:18 -0700452 /**
453 * <pre>
454 * One request followed by one response.
455 * The server returns the client payload as-is.
456 * </pre>
457 */
Xiao Hangdcff3152015-02-20 15:03:06 -0800458 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700459 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.nano.Test.SimpleResponse> unaryCall(
460 io.grpc.testing.integration.nano.Test.SimpleRequest request) {
Kun Zhang686dcff2015-07-16 12:34:37 -0700461 return futureUnaryCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700462 getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800463 }
464 }
465
ZHANG Dapenge1091252016-07-21 16:35:18 -0700466 /**
467 * This will be removed in the next release.
468 * If your code has been using gRPC-java v0.15.0 or higher already,
469 * the following changes to your code are suggested:
470 * <ul>
471 * <li> replace {@code extends/implements TestService} with {@code extends TestServiceImplBase} for server side;</li>
472 * <li> replace {@code TestService} with {@code TestServiceStub} for client side;</li>
473 * <li> replace usage of {@code TestService} with {@code TestServiceImplBase};</li>
474 * <li> replace usage of {@code AbstractTestService} with {@link TestServiceImplBase};</li>
475 * <li> replace {@code serverBuilder.addService(TestServiceGrpc.bindService(serviceImpl))}
476 * with {@code serverBuilder.addService(serviceImpl)};</li>
477 * <li> if you are mocking stubs using mockito, please do not mock them.
478 * See the documentation on testing with gRPC-java;</li>
479 * <li> replace {@code TestServiceBlockingClient} with {@link TestServiceBlockingStub};</li>
480 * <li> replace {@code TestServiceFutureClient} with {@link TestServiceFutureStub}.</li>
481 * </ul>
482 */
483 @java.lang.Deprecated public static interface TestService {
484
485 public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request,
486 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.SimpleResponse> responseObserver);
487
488 public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request,
489 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver);
490
491 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest> streamingInputCall(
492 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> responseObserver);
493
494 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> fullBidiCall(
495 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver);
496
497 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> halfBidiCall(
498 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver);
499 }
500
501 /**
502 * This will be removed in the next release.
503 * If your code has been using gRPC-java v0.15.0 or higher already,
504 * the following changes to your code are suggested:
505 * <ul>
506 * <li> replace {@code extends/implements TestService} with {@code extends TestServiceImplBase} for server side;</li>
507 * <li> replace {@code TestService} with {@code TestServiceStub} for client side;</li>
508 * <li> replace usage of {@code TestService} with {@code TestServiceImplBase};</li>
509 * <li> replace usage of {@code AbstractTestService} with {@link TestServiceImplBase};</li>
510 * <li> replace {@code serverBuilder.addService(TestServiceGrpc.bindService(serviceImpl))}
511 * with {@code serverBuilder.addService(serviceImpl)};</li>
512 * <li> if you are mocking stubs using mockito, please do not mock them.
513 * See the documentation on testing with gRPC-java;</li>
514 * <li> replace {@code TestServiceBlockingClient} with {@link TestServiceBlockingStub};</li>
515 * <li> replace {@code TestServiceFutureClient} with {@link TestServiceFutureStub}.</li>
516 * </ul>
517 */
518 @java.lang.Deprecated public static interface TestServiceBlockingClient {
519
520 public io.grpc.testing.integration.nano.Test.SimpleResponse unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request);
521
522 public java.util.Iterator<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> streamingOutputCall(
523 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request);
524 }
525
526 /**
527 * This will be removed in the next release.
528 * If your code has been using gRPC-java v0.15.0 or higher already,
529 * the following changes to your code are suggested:
530 * <ul>
531 * <li> replace {@code extends/implements TestService} with {@code extends TestServiceImplBase} for server side;</li>
532 * <li> replace {@code TestService} with {@code TestServiceStub} for client side;</li>
533 * <li> replace usage of {@code TestService} with {@code TestServiceImplBase};</li>
534 * <li> replace usage of {@code AbstractTestService} with {@link TestServiceImplBase};</li>
535 * <li> replace {@code serverBuilder.addService(TestServiceGrpc.bindService(serviceImpl))}
536 * with {@code serverBuilder.addService(serviceImpl)};</li>
537 * <li> if you are mocking stubs using mockito, please do not mock them.
538 * See the documentation on testing with gRPC-java;</li>
539 * <li> replace {@code TestServiceBlockingClient} with {@link TestServiceBlockingStub};</li>
540 * <li> replace {@code TestServiceFutureClient} with {@link TestServiceFutureStub}.</li>
541 * </ul>
542 */
543 @java.lang.Deprecated public static interface TestServiceFutureClient {
544
545 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.nano.Test.SimpleResponse> unaryCall(
546 io.grpc.testing.integration.nano.Test.SimpleRequest request);
547 }
548
549 /**
550 * This will be removed in the next release.
551 * If your code has been using gRPC-java v0.15.0 or higher already,
552 * the following changes to your code are suggested:
553 * <ul>
554 * <li> replace {@code extends/implements TestService} with {@code extends TestServiceImplBase} for server side;</li>
555 * <li> replace {@code TestService} with {@code TestServiceStub} for client side;</li>
556 * <li> replace usage of {@code TestService} with {@code TestServiceImplBase};</li>
557 * <li> replace usage of {@code AbstractTestService} with {@link TestServiceImplBase};</li>
558 * <li> replace {@code serverBuilder.addService(TestServiceGrpc.bindService(serviceImpl))}
559 * with {@code serverBuilder.addService(serviceImpl)};</li>
560 * <li> if you are mocking stubs using mockito, please do not mock them.
561 * See the documentation on testing with gRPC-java;</li>
562 * <li> replace {@code TestServiceBlockingClient} with {@link TestServiceBlockingStub};</li>
563 * <li> replace {@code TestServiceFutureClient} with {@link TestServiceFutureStub}.</li>
564 * </ul>
565 */
ZHANG Dapengf149e4c2016-06-29 21:17:03 -0700566 @java.lang.Deprecated public static abstract class AbstractTestService extends TestServiceImplBase {}
567
ZHANG Dapenge1091252016-07-21 16:35:18 -0700568 /**
569 * This will be removed in the next release.
570 * If your code has been using gRPC-java v0.15.0 or higher already,
571 * the following changes to your code are suggested:
572 * <ul>
573 * <li> replace {@code extends/implements TestService} with {@code extends TestServiceImplBase} for server side;</li>
574 * <li> replace {@code TestService} with {@code TestServiceStub} for client side;</li>
575 * <li> replace usage of {@code TestService} with {@code TestServiceImplBase};</li>
576 * <li> replace usage of {@code AbstractTestService} with {@link TestServiceImplBase};</li>
577 * <li> replace {@code serverBuilder.addService(TestServiceGrpc.bindService(serviceImpl))}
578 * with {@code serverBuilder.addService(serviceImpl)};</li>
579 * <li> if you are mocking stubs using mockito, please do not mock them.
580 * See the documentation on testing with gRPC-java;</li>
581 * <li> replace {@code TestServiceBlockingClient} with {@link TestServiceBlockingStub};</li>
582 * <li> replace {@code TestServiceFutureClient} with {@link TestServiceFutureStub}.</li>
583 * </ul>
584 */
585 @java.lang.Deprecated public static io.grpc.ServerServiceDefinition bindService(final TestService serviceImpl) {
586 return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
587 .addMethod(
588 METHOD_UNARY_CALL,
589 asyncUnaryCall(
590 new MethodHandlers<
591 io.grpc.testing.integration.nano.Test.SimpleRequest,
592 io.grpc.testing.integration.nano.Test.SimpleResponse>(
593 serviceImpl, METHODID_UNARY_CALL)))
594 .addMethod(
595 METHOD_STREAMING_OUTPUT_CALL,
596 asyncServerStreamingCall(
597 new MethodHandlers<
598 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
599 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>(
600 serviceImpl, METHODID_STREAMING_OUTPUT_CALL)))
601 .addMethod(
602 METHOD_STREAMING_INPUT_CALL,
603 asyncClientStreamingCall(
604 new MethodHandlers<
605 io.grpc.testing.integration.nano.Test.StreamingInputCallRequest,
606 io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>(
607 serviceImpl, METHODID_STREAMING_INPUT_CALL)))
608 .addMethod(
609 METHOD_FULL_BIDI_CALL,
610 asyncBidiStreamingCall(
611 new MethodHandlers<
612 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
613 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>(
614 serviceImpl, METHODID_FULL_BIDI_CALL)))
615 .addMethod(
616 METHOD_HALF_BIDI_CALL,
617 asyncBidiStreamingCall(
618 new MethodHandlers<
619 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
620 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>(
621 serviceImpl, METHODID_HALF_BIDI_CALL)))
622 .build();
623 }
624
Eric Andersond52429d2015-11-13 16:50:08 -0800625 private static final int METHODID_UNARY_CALL = 0;
626 private static final int METHODID_STREAMING_OUTPUT_CALL = 1;
627 private static final int METHODID_STREAMING_INPUT_CALL = 2;
628 private static final int METHODID_FULL_BIDI_CALL = 3;
629 private static final int METHODID_HALF_BIDI_CALL = 4;
630
631 private static class MethodHandlers<Req, Resp> implements
632 io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
633 io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
634 io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
635 io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
636 private final TestService serviceImpl;
637 private final int methodId;
638
639 public MethodHandlers(TestService serviceImpl, int methodId) {
640 this.serviceImpl = serviceImpl;
641 this.methodId = methodId;
642 }
643
Carl Mastrangeloffe0dce2016-03-04 14:15:02 -0800644 @java.lang.Override
Eric Andersond52429d2015-11-13 16:50:08 -0800645 @java.lang.SuppressWarnings("unchecked")
646 public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
647 switch (methodId) {
648 case METHODID_UNARY_CALL:
649 serviceImpl.unaryCall((io.grpc.testing.integration.nano.Test.SimpleRequest) request,
650 (io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.SimpleResponse>) responseObserver);
651 break;
652 case METHODID_STREAMING_OUTPUT_CALL:
653 serviceImpl.streamingOutputCall((io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest) request,
654 (io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>) responseObserver);
655 break;
656 default:
657 throw new AssertionError();
658 }
659 }
660
Carl Mastrangeloffe0dce2016-03-04 14:15:02 -0800661 @java.lang.Override
Eric Andersond52429d2015-11-13 16:50:08 -0800662 @java.lang.SuppressWarnings("unchecked")
663 public io.grpc.stub.StreamObserver<Req> invoke(
664 io.grpc.stub.StreamObserver<Resp> responseObserver) {
665 switch (methodId) {
666 case METHODID_STREAMING_INPUT_CALL:
667 return (io.grpc.stub.StreamObserver<Req>) serviceImpl.streamingInputCall(
668 (io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>) responseObserver);
669 case METHODID_FULL_BIDI_CALL:
670 return (io.grpc.stub.StreamObserver<Req>) serviceImpl.fullBidiCall(
671 (io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>) responseObserver);
672 case METHODID_HALF_BIDI_CALL:
673 return (io.grpc.stub.StreamObserver<Req>) serviceImpl.halfBidiCall(
674 (io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>) responseObserver);
675 default:
676 throw new AssertionError();
677 }
678 }
679 }
680
Eric Anderson66ab9562016-06-20 15:22:23 -0700681 public static io.grpc.ServiceDescriptor getServiceDescriptor() {
682 return new io.grpc.ServiceDescriptor(SERVICE_NAME,
683 METHOD_UNARY_CALL,
684 METHOD_STREAMING_OUTPUT_CALL,
685 METHOD_STREAMING_INPUT_CALL,
686 METHOD_FULL_BIDI_CALL,
687 METHOD_HALF_BIDI_CALL);
688 }
689
Xiao Hangdcff3152015-02-20 15:03:06 -0800690}