blob: 66021a724e37739f64d8232d5f6de654c42c082f [file] [log] [blame]
nmittlerf8314582015-01-27 10:25:39 -08001package io.grpc.testing.integration;
zhangkun835e607852015-01-22 12:31:56 -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;
zhangkun835e607852015-01-22 12:31:56 -080015
16@javax.annotation.Generated("by gRPC proto compiler")
17public class TestServiceGrpc {
18
Eric Andersonbe0d7e92015-09-10 09:47:17 -070019 private TestServiceGrpc() {}
20
David P. Baker66b984c2015-08-21 13:00:26 -040021 public static final String SERVICE_NAME = "grpc.testing.TestService";
22
Kun Zhang73acc732015-06-26 16:32:05 -070023 // Static method descriptors that strictly reflect the proto.
Kun Zhang5bb0ea92015-08-31 09:56:44 -070024 @io.grpc.ExperimentalApi
Kun Zhang73acc732015-06-26 16:32:05 -070025 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,
nmittlerf8314582015-01-27 10:25:39 -080026 io.grpc.testing.integration.Test.SimpleResponse> METHOD_UNARY_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070027 io.grpc.MethodDescriptor.create(
28 io.grpc.MethodDescriptor.MethodType.UNARY,
Kun Zhang042b2782015-08-17 15:43:40 -070029 generateFullMethodName(
30 "grpc.testing.TestService", "UnaryCall"),
Eric Anderson47a7ccf2015-09-03 16:56:36 -070031 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleRequest.getDefaultInstance()),
32 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleResponse.getDefaultInstance()));
Kun Zhang5bb0ea92015-08-31 09:56:44 -070033 @io.grpc.ExperimentalApi
Kun Zhang73acc732015-06-26 16:32:05 -070034 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
nmittlerf8314582015-01-27 10:25:39 -080035 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070036 io.grpc.MethodDescriptor.create(
37 io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -070038 generateFullMethodName(
39 "grpc.testing.TestService", "StreamingOutputCall"),
Eric Anderson47a7ccf2015-09-03 16:56:36 -070040 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance()),
41 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.getDefaultInstance()));
Kun Zhang5bb0ea92015-08-31 09:56:44 -070042 @io.grpc.ExperimentalApi
Kun Zhang73acc732015-06-26 16:32:05 -070043 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingInputCallRequest,
nmittlerf8314582015-01-27 10:25:39 -080044 io.grpc.testing.integration.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070045 io.grpc.MethodDescriptor.create(
46 io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -070047 generateFullMethodName(
48 "grpc.testing.TestService", "StreamingInputCall"),
Eric Anderson47a7ccf2015-09-03 16:56:36 -070049 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallRequest.getDefaultInstance()),
50 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallResponse.getDefaultInstance()));
Kun Zhang5bb0ea92015-08-31 09:56:44 -070051 @io.grpc.ExperimentalApi
Kun Zhang73acc732015-06-26 16:32:05 -070052 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070053 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_BIDI_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070054 io.grpc.MethodDescriptor.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070055 io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -070056 generateFullMethodName(
57 "grpc.testing.TestService", "FullBidiCall"),
Eric Anderson47a7ccf2015-09-03 16:56:36 -070058 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance()),
59 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.getDefaultInstance()));
Kun Zhang5bb0ea92015-08-31 09:56:44 -070060 @io.grpc.ExperimentalApi
Kun Zhang73acc732015-06-26 16:32:05 -070061 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070062 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_BIDI_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070063 io.grpc.MethodDescriptor.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070064 io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -070065 generateFullMethodName(
66 "grpc.testing.TestService", "HalfBidiCall"),
Eric Anderson47a7ccf2015-09-03 16:56:36 -070067 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance()),
68 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.getDefaultInstance()));
zhangkun835e607852015-01-22 12:31:56 -080069
nmittlerf8314582015-01-27 10:25:39 -080070 public static TestServiceStub newStub(io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -070071 return new TestServiceStub(channel);
zhangkun835e607852015-01-22 12:31:56 -080072 }
73
74 public static TestServiceBlockingStub newBlockingStub(
nmittlerf8314582015-01-27 10:25:39 -080075 io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -070076 return new TestServiceBlockingStub(channel);
zhangkun835e607852015-01-22 12:31:56 -080077 }
78
79 public static TestServiceFutureStub newFutureStub(
nmittlerf8314582015-01-27 10:25:39 -080080 io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -070081 return new TestServiceFutureStub(channel);
zhangkun835e607852015-01-22 12:31:56 -080082 }
83
84 public static interface TestService {
85
nmittlerf8314582015-01-27 10:25:39 -080086 public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request,
87 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -080088
nmittlerf8314582015-01-27 10:25:39 -080089 public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
90 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -080091
nmittlerf8314582015-01-27 10:25:39 -080092 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
93 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -080094
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070095 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullBidiCall(
nmittlerf8314582015-01-27 10:25:39 -080096 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -080097
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070098 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfBidiCall(
nmittlerf8314582015-01-27 10:25:39 -080099 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800100 }
101
102 public static interface TestServiceBlockingClient {
103
nmittlerf8314582015-01-27 10:25:39 -0800104 public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request);
zhangkun835e607852015-01-22 12:31:56 -0800105
nmittlerf8314582015-01-27 10:25:39 -0800106 public java.util.Iterator<io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall(
107 io.grpc.testing.integration.Test.StreamingOutputCallRequest request);
zhangkun835e607852015-01-22 12:31:56 -0800108 }
109
110 public static interface TestServiceFutureClient {
111
nmittlerf8314582015-01-27 10:25:39 -0800112 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Test.SimpleResponse> unaryCall(
113 io.grpc.testing.integration.Test.SimpleRequest request);
zhangkun835e607852015-01-22 12:31:56 -0800114 }
115
Kun Zhangeb929672015-07-17 17:02:58 -0700116 public static class TestServiceStub extends io.grpc.stub.AbstractStub<TestServiceStub>
zhangkun835e607852015-01-22 12:31:56 -0800117 implements TestService {
Kun Zhangeb929672015-07-17 17:02:58 -0700118 private TestServiceStub(io.grpc.Channel channel) {
119 super(channel);
zhangkun835e607852015-01-22 12:31:56 -0800120 }
121
Kun Zhangd3c5b002015-06-25 20:24:01 -0700122 private TestServiceStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700123 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700124 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700125 }
126
zhangkun835e607852015-01-22 12:31:56 -0800127 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800128 protected TestServiceStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700129 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700130 return new TestServiceStub(channel, callOptions);
zhangkun835e607852015-01-22 12:31:56 -0800131 }
132
133 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800134 public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request,
135 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800136 asyncUnaryCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700137 getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request, responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800138 }
139
140 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800141 public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
142 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800143 asyncServerStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700144 getChannel().newCall(METHOD_STREAMING_OUTPUT_CALL, getCallOptions()), request, responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800145 }
146
147 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800148 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
149 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800150 return asyncClientStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700151 getChannel().newCall(METHOD_STREAMING_INPUT_CALL, getCallOptions()), responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800152 }
153
154 @java.lang.Override
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700155 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullBidiCall(
nmittlerf8314582015-01-27 10:25:39 -0800156 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700157 return asyncBidiStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700158 getChannel().newCall(METHOD_FULL_BIDI_CALL, getCallOptions()), responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800159 }
160
161 @java.lang.Override
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700162 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfBidiCall(
nmittlerf8314582015-01-27 10:25:39 -0800163 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700164 return asyncBidiStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700165 getChannel().newCall(METHOD_HALF_BIDI_CALL, getCallOptions()), responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800166 }
167 }
168
Kun Zhangeb929672015-07-17 17:02:58 -0700169 public static class TestServiceBlockingStub extends io.grpc.stub.AbstractStub<TestServiceBlockingStub>
zhangkun835e607852015-01-22 12:31:56 -0800170 implements TestServiceBlockingClient {
Kun Zhangeb929672015-07-17 17:02:58 -0700171 private TestServiceBlockingStub(io.grpc.Channel channel) {
172 super(channel);
zhangkun835e607852015-01-22 12:31:56 -0800173 }
174
Kun Zhangd3c5b002015-06-25 20:24:01 -0700175 private TestServiceBlockingStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700176 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700177 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700178 }
179
zhangkun835e607852015-01-22 12:31:56 -0800180 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800181 protected TestServiceBlockingStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700182 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700183 return new TestServiceBlockingStub(channel, callOptions);
zhangkun835e607852015-01-22 12:31:56 -0800184 }
185
186 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800187 public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request) {
zhangkun835e607852015-01-22 12:31:56 -0800188 return blockingUnaryCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700189 getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request);
zhangkun835e607852015-01-22 12:31:56 -0800190 }
191
192 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800193 public java.util.Iterator<io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall(
194 io.grpc.testing.integration.Test.StreamingOutputCallRequest request) {
zhangkun835e607852015-01-22 12:31:56 -0800195 return blockingServerStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700196 getChannel().newCall(METHOD_STREAMING_OUTPUT_CALL, getCallOptions()), request);
zhangkun835e607852015-01-22 12:31:56 -0800197 }
198 }
199
Kun Zhangeb929672015-07-17 17:02:58 -0700200 public static class TestServiceFutureStub extends io.grpc.stub.AbstractStub<TestServiceFutureStub>
zhangkun835e607852015-01-22 12:31:56 -0800201 implements TestServiceFutureClient {
Kun Zhangeb929672015-07-17 17:02:58 -0700202 private TestServiceFutureStub(io.grpc.Channel channel) {
203 super(channel);
zhangkun835e607852015-01-22 12:31:56 -0800204 }
205
Kun Zhangd3c5b002015-06-25 20:24:01 -0700206 private TestServiceFutureStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700207 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700208 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700209 }
210
zhangkun835e607852015-01-22 12:31:56 -0800211 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800212 protected TestServiceFutureStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700213 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700214 return new TestServiceFutureStub(channel, callOptions);
zhangkun835e607852015-01-22 12:31:56 -0800215 }
216
217 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800218 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Test.SimpleResponse> unaryCall(
219 io.grpc.testing.integration.Test.SimpleRequest request) {
Kun Zhang686dcff2015-07-16 12:34:37 -0700220 return futureUnaryCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700221 getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request);
zhangkun835e607852015-01-22 12:31:56 -0800222 }
223 }
224
nmittlerf8314582015-01-27 10:25:39 -0800225 public static io.grpc.ServerServiceDefinition bindService(
zhangkun835e607852015-01-22 12:31:56 -0800226 final TestService serviceImpl) {
David P. Baker66b984c2015-08-21 13:00:26 -0400227 return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME)
Kun Zhang73acc732015-06-26 16:32:05 -0700228 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800229 METHOD_UNARY_CALL,
Kun Zhang867c76d2015-07-13 17:15:34 -0700230 asyncUnaryCall(
231 new io.grpc.stub.ServerCalls.UnaryMethod<
nmittlerf8314582015-01-27 10:25:39 -0800232 io.grpc.testing.integration.Test.SimpleRequest,
233 io.grpc.testing.integration.Test.SimpleResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800234 @java.lang.Override
235 public void invoke(
nmittlerf8314582015-01-27 10:25:39 -0800236 io.grpc.testing.integration.Test.SimpleRequest request,
237 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800238 serviceImpl.unaryCall(request, responseObserver);
239 }
240 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700241 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800242 METHOD_STREAMING_OUTPUT_CALL,
Kun Zhang867c76d2015-07-13 17:15:34 -0700243 asyncServerStreamingCall(
244 new io.grpc.stub.ServerCalls.ServerStreamingMethod<
nmittlerf8314582015-01-27 10:25:39 -0800245 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
246 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800247 @java.lang.Override
248 public void invoke(
nmittlerf8314582015-01-27 10:25:39 -0800249 io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
250 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800251 serviceImpl.streamingOutputCall(request, responseObserver);
252 }
253 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700254 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800255 METHOD_STREAMING_INPUT_CALL,
Kun Zhang867c76d2015-07-13 17:15:34 -0700256 asyncClientStreamingCall(
257 new io.grpc.stub.ServerCalls.ClientStreamingMethod<
nmittlerf8314582015-01-27 10:25:39 -0800258 io.grpc.testing.integration.Test.StreamingInputCallRequest,
259 io.grpc.testing.integration.Test.StreamingInputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800260 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800261 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> invoke(
262 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800263 return serviceImpl.streamingInputCall(responseObserver);
264 }
265 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700266 .addMethod(io.grpc.ServerMethodDefinition.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700267 METHOD_FULL_BIDI_CALL,
268 asyncBidiStreamingCall(
269 new io.grpc.stub.ServerCalls.BidiStreamingMethod<
nmittlerf8314582015-01-27 10:25:39 -0800270 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
271 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800272 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800273 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
274 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700275 return serviceImpl.fullBidiCall(responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800276 }
277 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700278 .addMethod(io.grpc.ServerMethodDefinition.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700279 METHOD_HALF_BIDI_CALL,
280 asyncBidiStreamingCall(
281 new io.grpc.stub.ServerCalls.BidiStreamingMethod<
nmittlerf8314582015-01-27 10:25:39 -0800282 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
283 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800284 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800285 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
286 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700287 return serviceImpl.halfBidiCall(responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800288 }
289 }))).build();
290 }
291}