blob: edcb936d042d544481c80de391ab571b67dc389a [file] [log] [blame]
Xiao Hangdcff3152015-02-20 15:03:06 -08001package io.grpc.testing.integration;
2
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 Zhang867c76d2015-07-13 17:15:34 -070010import static io.grpc.stub.ServerCalls.asyncUnaryCall;
11import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
12import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070013import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
Xiao Hangdcff3152015-02-20 15:03:06 -080014
15import java.io.IOException;
16
17@javax.annotation.Generated("by gRPC proto compiler")
18public class TestServiceGrpc {
19
Kun Zhang73acc732015-06-26 16:32:05 -070020 // Static method descriptors that strictly reflect the proto.
21 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,
Xiao Hangdcff3152015-02-20 15:03:06 -080022 io.grpc.testing.integration.Test.SimpleResponse> METHOD_UNARY_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070023 io.grpc.MethodDescriptor.create(
24 io.grpc.MethodDescriptor.MethodType.UNARY,
25 "grpc.testing.TestService", "UnaryCall",
Eric Anderson3666de42015-04-10 16:35:23 -070026 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.SimpleRequest>marshaller(
27 new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.SimpleRequest>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080028 @Override
29 public io.grpc.testing.integration.Test.SimpleRequest parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
30 return io.grpc.testing.integration.Test.SimpleRequest.parseFrom(input);
31 }
32 }),
Eric Anderson3666de42015-04-10 16:35:23 -070033 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.SimpleResponse>marshaller(
34 new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.SimpleResponse>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080035 @Override
36 public io.grpc.testing.integration.Test.SimpleResponse parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
37 return io.grpc.testing.integration.Test.SimpleResponse.parseFrom(input);
38 }
39 }));
Kun Zhang73acc732015-06-26 16:32:05 -070040 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
Xiao Hangdcff3152015-02-20 15:03:06 -080041 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070042 io.grpc.MethodDescriptor.create(
43 io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
44 "grpc.testing.TestService", "StreamingOutputCall",
Eric Anderson3666de42015-04-10 16:35:23 -070045 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.StreamingOutputCallRequest>marshaller(
46 new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.StreamingOutputCallRequest>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080047 @Override
48 public io.grpc.testing.integration.Test.StreamingOutputCallRequest parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
49 return io.grpc.testing.integration.Test.StreamingOutputCallRequest.parseFrom(input);
50 }
51 }),
Eric Anderson3666de42015-04-10 16:35:23 -070052 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.StreamingOutputCallResponse>marshaller(
53 new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080054 @Override
55 public io.grpc.testing.integration.Test.StreamingOutputCallResponse parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
56 return io.grpc.testing.integration.Test.StreamingOutputCallResponse.parseFrom(input);
57 }
58 }));
Kun Zhang73acc732015-06-26 16:32:05 -070059 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingInputCallRequest,
Xiao Hangdcff3152015-02-20 15:03:06 -080060 io.grpc.testing.integration.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070061 io.grpc.MethodDescriptor.create(
62 io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING,
63 "grpc.testing.TestService", "StreamingInputCall",
Eric Anderson3666de42015-04-10 16:35:23 -070064 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.StreamingInputCallRequest>marshaller(
65 new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.StreamingInputCallRequest>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080066 @Override
67 public io.grpc.testing.integration.Test.StreamingInputCallRequest parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
68 return io.grpc.testing.integration.Test.StreamingInputCallRequest.parseFrom(input);
69 }
70 }),
Eric Anderson3666de42015-04-10 16:35:23 -070071 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.StreamingInputCallResponse>marshaller(
72 new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.StreamingInputCallResponse>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080073 @Override
74 public io.grpc.testing.integration.Test.StreamingInputCallResponse parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
75 return io.grpc.testing.integration.Test.StreamingInputCallResponse.parseFrom(input);
76 }
77 }));
Kun Zhang73acc732015-06-26 16:32:05 -070078 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070079 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_BIDI_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070080 io.grpc.MethodDescriptor.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070081 io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
82 "grpc.testing.TestService", "FullBidiCall",
Eric Anderson3666de42015-04-10 16:35:23 -070083 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.StreamingOutputCallRequest>marshaller(
84 new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.StreamingOutputCallRequest>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080085 @Override
86 public io.grpc.testing.integration.Test.StreamingOutputCallRequest parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
87 return io.grpc.testing.integration.Test.StreamingOutputCallRequest.parseFrom(input);
88 }
89 }),
Eric Anderson3666de42015-04-10 16:35:23 -070090 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.StreamingOutputCallResponse>marshaller(
91 new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080092 @Override
93 public io.grpc.testing.integration.Test.StreamingOutputCallResponse parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
94 return io.grpc.testing.integration.Test.StreamingOutputCallResponse.parseFrom(input);
95 }
96 }));
Kun Zhang73acc732015-06-26 16:32:05 -070097 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070098 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_BIDI_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070099 io.grpc.MethodDescriptor.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700100 io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
101 "grpc.testing.TestService", "HalfBidiCall",
Eric Anderson3666de42015-04-10 16:35:23 -0700102 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.StreamingOutputCallRequest>marshaller(
103 new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.StreamingOutputCallRequest>() {
Xiao Hangdcff3152015-02-20 15:03:06 -0800104 @Override
105 public io.grpc.testing.integration.Test.StreamingOutputCallRequest parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
106 return io.grpc.testing.integration.Test.StreamingOutputCallRequest.parseFrom(input);
107 }
108 }),
Eric Anderson3666de42015-04-10 16:35:23 -0700109 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.StreamingOutputCallResponse>marshaller(
110 new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
Xiao Hangdcff3152015-02-20 15:03:06 -0800111 @Override
112 public io.grpc.testing.integration.Test.StreamingOutputCallResponse parse(com.google.protobuf.nano.CodedInputByteBufferNano input) throws IOException {
113 return io.grpc.testing.integration.Test.StreamingOutputCallResponse.parseFrom(input);
114 }
115 }));
116
117 public static TestServiceStub newStub(io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -0700118 return new TestServiceStub(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800119 }
120
121 public static TestServiceBlockingStub newBlockingStub(
122 io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -0700123 return new TestServiceBlockingStub(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800124 }
125
126 public static TestServiceFutureStub newFutureStub(
127 io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -0700128 return new TestServiceFutureStub(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800129 }
130
131 public static interface TestService {
132
133 public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request,
134 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver);
135
136 public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
137 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
138
139 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
140 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver);
141
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700142 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullBidiCall(
Xiao Hangdcff3152015-02-20 15:03:06 -0800143 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
144
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700145 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfBidiCall(
Xiao Hangdcff3152015-02-20 15:03:06 -0800146 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
147 }
148
149 public static interface TestServiceBlockingClient {
150
151 public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request);
152
153 public java.util.Iterator<io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall(
154 io.grpc.testing.integration.Test.StreamingOutputCallRequest request);
155 }
156
157 public static interface TestServiceFutureClient {
158
159 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Test.SimpleResponse> unaryCall(
160 io.grpc.testing.integration.Test.SimpleRequest request);
161 }
162
Kun Zhangeb929672015-07-17 17:02:58 -0700163 public static class TestServiceStub extends io.grpc.stub.AbstractStub<TestServiceStub>
Xiao Hangdcff3152015-02-20 15:03:06 -0800164 implements TestService {
Kun Zhangeb929672015-07-17 17:02:58 -0700165 private TestServiceStub(io.grpc.Channel channel) {
166 super(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800167 }
168
Kun Zhangd3c5b002015-06-25 20:24:01 -0700169 private TestServiceStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700170 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700171 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700172 }
173
Xiao Hangdcff3152015-02-20 15:03:06 -0800174 @java.lang.Override
175 protected TestServiceStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700176 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700177 return new TestServiceStub(channel, callOptions);
Xiao Hangdcff3152015-02-20 15:03:06 -0800178 }
179
180 @java.lang.Override
181 public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request,
182 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver) {
183 asyncUnaryCall(
Kun Zhangeb929672015-07-17 17:02:58 -0700184 channel.newCall(METHOD_UNARY_CALL, callOptions), request, responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800185 }
186
187 @java.lang.Override
188 public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
189 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
190 asyncServerStreamingCall(
Kun Zhangeb929672015-07-17 17:02:58 -0700191 channel.newCall(METHOD_STREAMING_OUTPUT_CALL, callOptions), request, responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800192 }
193
194 @java.lang.Override
195 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
196 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver) {
197 return asyncClientStreamingCall(
Kun Zhangeb929672015-07-17 17:02:58 -0700198 channel.newCall(METHOD_STREAMING_INPUT_CALL, callOptions), responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800199 }
200
201 @java.lang.Override
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700202 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullBidiCall(
Xiao Hangdcff3152015-02-20 15:03:06 -0800203 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700204 return asyncBidiStreamingCall(
205 channel.newCall(METHOD_FULL_BIDI_CALL, callOptions), responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800206 }
207
208 @java.lang.Override
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700209 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfBidiCall(
Xiao Hangdcff3152015-02-20 15:03:06 -0800210 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700211 return asyncBidiStreamingCall(
212 channel.newCall(METHOD_HALF_BIDI_CALL, callOptions), responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800213 }
214 }
215
Kun Zhangeb929672015-07-17 17:02:58 -0700216 public static class TestServiceBlockingStub extends io.grpc.stub.AbstractStub<TestServiceBlockingStub>
Xiao Hangdcff3152015-02-20 15:03:06 -0800217 implements TestServiceBlockingClient {
Kun Zhangeb929672015-07-17 17:02:58 -0700218 private TestServiceBlockingStub(io.grpc.Channel channel) {
219 super(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800220 }
221
Kun Zhangd3c5b002015-06-25 20:24:01 -0700222 private TestServiceBlockingStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700223 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700224 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700225 }
226
Xiao Hangdcff3152015-02-20 15:03:06 -0800227 @java.lang.Override
228 protected TestServiceBlockingStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700229 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700230 return new TestServiceBlockingStub(channel, callOptions);
Xiao Hangdcff3152015-02-20 15:03:06 -0800231 }
232
233 @java.lang.Override
234 public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request) {
235 return blockingUnaryCall(
Kun Zhangeb929672015-07-17 17:02:58 -0700236 channel.newCall(METHOD_UNARY_CALL, callOptions), request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800237 }
238
239 @java.lang.Override
240 public java.util.Iterator<io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall(
241 io.grpc.testing.integration.Test.StreamingOutputCallRequest request) {
242 return blockingServerStreamingCall(
Kun Zhangeb929672015-07-17 17:02:58 -0700243 channel.newCall(METHOD_STREAMING_OUTPUT_CALL, callOptions), request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800244 }
245 }
246
Kun Zhangeb929672015-07-17 17:02:58 -0700247 public static class TestServiceFutureStub extends io.grpc.stub.AbstractStub<TestServiceFutureStub>
Xiao Hangdcff3152015-02-20 15:03:06 -0800248 implements TestServiceFutureClient {
Kun Zhangeb929672015-07-17 17:02:58 -0700249 private TestServiceFutureStub(io.grpc.Channel channel) {
250 super(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800251 }
252
Kun Zhangd3c5b002015-06-25 20:24:01 -0700253 private TestServiceFutureStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700254 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700255 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700256 }
257
Xiao Hangdcff3152015-02-20 15:03:06 -0800258 @java.lang.Override
259 protected TestServiceFutureStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700260 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700261 return new TestServiceFutureStub(channel, callOptions);
Xiao Hangdcff3152015-02-20 15:03:06 -0800262 }
263
264 @java.lang.Override
265 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Test.SimpleResponse> unaryCall(
266 io.grpc.testing.integration.Test.SimpleRequest request) {
Kun Zhang686dcff2015-07-16 12:34:37 -0700267 return futureUnaryCall(
Kun Zhangeb929672015-07-17 17:02:58 -0700268 channel.newCall(METHOD_UNARY_CALL, callOptions), request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800269 }
270 }
271
272 public static io.grpc.ServerServiceDefinition bindService(
273 final TestService serviceImpl) {
274 return io.grpc.ServerServiceDefinition.builder("grpc.testing.TestService")
Kun Zhang73acc732015-06-26 16:32:05 -0700275 .addMethod(io.grpc.ServerMethodDefinition.create(
Xiao Hangdcff3152015-02-20 15:03:06 -0800276 METHOD_UNARY_CALL,
Kun Zhang867c76d2015-07-13 17:15:34 -0700277 asyncUnaryCall(
278 new io.grpc.stub.ServerCalls.UnaryMethod<
Xiao Hangdcff3152015-02-20 15:03:06 -0800279 io.grpc.testing.integration.Test.SimpleRequest,
280 io.grpc.testing.integration.Test.SimpleResponse>() {
281 @java.lang.Override
282 public void invoke(
283 io.grpc.testing.integration.Test.SimpleRequest request,
284 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver) {
285 serviceImpl.unaryCall(request, responseObserver);
286 }
287 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700288 .addMethod(io.grpc.ServerMethodDefinition.create(
Xiao Hangdcff3152015-02-20 15:03:06 -0800289 METHOD_STREAMING_OUTPUT_CALL,
Kun Zhang867c76d2015-07-13 17:15:34 -0700290 asyncServerStreamingCall(
291 new io.grpc.stub.ServerCalls.ServerStreamingMethod<
Xiao Hangdcff3152015-02-20 15:03:06 -0800292 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
293 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
294 @java.lang.Override
295 public void invoke(
296 io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
297 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
298 serviceImpl.streamingOutputCall(request, responseObserver);
299 }
300 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700301 .addMethod(io.grpc.ServerMethodDefinition.create(
Xiao Hangdcff3152015-02-20 15:03:06 -0800302 METHOD_STREAMING_INPUT_CALL,
Kun Zhang867c76d2015-07-13 17:15:34 -0700303 asyncClientStreamingCall(
304 new io.grpc.stub.ServerCalls.ClientStreamingMethod<
Xiao Hangdcff3152015-02-20 15:03:06 -0800305 io.grpc.testing.integration.Test.StreamingInputCallRequest,
306 io.grpc.testing.integration.Test.StreamingInputCallResponse>() {
307 @java.lang.Override
308 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> invoke(
309 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver) {
310 return serviceImpl.streamingInputCall(responseObserver);
311 }
312 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700313 .addMethod(io.grpc.ServerMethodDefinition.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700314 METHOD_FULL_BIDI_CALL,
315 asyncBidiStreamingCall(
316 new io.grpc.stub.ServerCalls.BidiStreamingMethod<
Xiao Hangdcff3152015-02-20 15:03:06 -0800317 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
318 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
319 @java.lang.Override
320 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
321 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700322 return serviceImpl.fullBidiCall(responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800323 }
324 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700325 .addMethod(io.grpc.ServerMethodDefinition.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700326 METHOD_HALF_BIDI_CALL,
327 asyncBidiStreamingCall(
328 new io.grpc.stub.ServerCalls.BidiStreamingMethod<
Xiao Hangdcff3152015-02-20 15:03:06 -0800329 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
330 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
331 @java.lang.Override
332 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
333 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700334 return serviceImpl.halfBidiCall(responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800335 }
336 }))).build();
337 }
338}