blob: 13d92f373308ba6538816cdc530762f524a573b8 [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;
6import static io.grpc.stub.ClientCalls.duplexStreamingCall;
7import static io.grpc.stub.ClientCalls.blockingUnaryCall;
8import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
9import static io.grpc.stub.ClientCalls.unaryFutureCall;
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;
13import static io.grpc.stub.ServerCalls.asyncDuplexStreamingCall;
zhangkun835e607852015-01-22 12:31:56 -080014
15@javax.annotation.Generated("by gRPC proto compiler")
16public class TestServiceGrpc {
17
Kun Zhang73acc732015-06-26 16:32:05 -070018 // Static method descriptors that strictly reflect the proto.
19 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,
nmittlerf8314582015-01-27 10:25:39 -080020 io.grpc.testing.integration.Test.SimpleResponse> METHOD_UNARY_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070021 io.grpc.MethodDescriptor.create(
22 io.grpc.MethodDescriptor.MethodType.UNARY,
23 "grpc.testing.TestService", "UnaryCall",
24 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleRequest.PARSER),
25 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleResponse.PARSER));
26 // Static method descriptors that strictly reflect the proto.
27 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
nmittlerf8314582015-01-27 10:25:39 -080028 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070029 io.grpc.MethodDescriptor.create(
30 io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
31 "grpc.testing.TestService", "StreamingOutputCall",
32 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER),
33 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER));
34 // Static method descriptors that strictly reflect the proto.
35 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingInputCallRequest,
nmittlerf8314582015-01-27 10:25:39 -080036 io.grpc.testing.integration.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070037 io.grpc.MethodDescriptor.create(
38 io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING,
39 "grpc.testing.TestService", "StreamingInputCall",
40 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallRequest.PARSER),
41 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallResponse.PARSER));
42 // Static method descriptors that strictly reflect the proto.
43 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
nmittlerf8314582015-01-27 10:25:39 -080044 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_DUPLEX_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070045 io.grpc.MethodDescriptor.create(
46 io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
47 "grpc.testing.TestService", "FullDuplexCall",
48 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER),
49 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER));
50 // Static method descriptors that strictly reflect the proto.
51 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
nmittlerf8314582015-01-27 10:25:39 -080052 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_DUPLEX_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070053 io.grpc.MethodDescriptor.create(
54 io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
55 "grpc.testing.TestService", "HalfDuplexCall",
56 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER),
57 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER));
zhangkun835e607852015-01-22 12:31:56 -080058
nmittlerf8314582015-01-27 10:25:39 -080059 public static TestServiceStub newStub(io.grpc.Channel channel) {
zhangkun835e607852015-01-22 12:31:56 -080060 return new TestServiceStub(channel, CONFIG);
61 }
62
63 public static TestServiceBlockingStub newBlockingStub(
nmittlerf8314582015-01-27 10:25:39 -080064 io.grpc.Channel channel) {
zhangkun835e607852015-01-22 12:31:56 -080065 return new TestServiceBlockingStub(channel, CONFIG);
66 }
67
68 public static TestServiceFutureStub newFutureStub(
nmittlerf8314582015-01-27 10:25:39 -080069 io.grpc.Channel channel) {
zhangkun835e607852015-01-22 12:31:56 -080070 return new TestServiceFutureStub(channel, CONFIG);
71 }
72
Kun Zhang73acc732015-06-26 16:32:05 -070073 // The default service descriptor
74 private static final TestServiceServiceDescriptor CONFIG =
zhangkun835e607852015-01-22 12:31:56 -080075 new TestServiceServiceDescriptor();
76
77 @javax.annotation.concurrent.Immutable
78 public static class TestServiceServiceDescriptor extends
nmittlerf8314582015-01-27 10:25:39 -080079 io.grpc.stub.AbstractServiceDescriptor<TestServiceServiceDescriptor> {
80 public final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,
81 io.grpc.testing.integration.Test.SimpleResponse> unaryCall;
82 public final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
83 io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall;
84 public final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingInputCallRequest,
85 io.grpc.testing.integration.Test.StreamingInputCallResponse> streamingInputCall;
86 public final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
87 io.grpc.testing.integration.Test.StreamingOutputCallResponse> fullDuplexCall;
88 public final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
89 io.grpc.testing.integration.Test.StreamingOutputCallResponse> halfDuplexCall;
zhangkun835e607852015-01-22 12:31:56 -080090
91 private TestServiceServiceDescriptor() {
Kun Zhang73acc732015-06-26 16:32:05 -070092 unaryCall = METHOD_UNARY_CALL;
93 streamingOutputCall = METHOD_STREAMING_OUTPUT_CALL;
94 streamingInputCall = METHOD_STREAMING_INPUT_CALL;
95 fullDuplexCall = METHOD_FULL_DUPLEX_CALL;
96 halfDuplexCall = METHOD_HALF_DUPLEX_CALL;
zhangkun835e607852015-01-22 12:31:56 -080097 }
98
Eric Anderson76d09552015-03-12 15:25:11 -070099 @SuppressWarnings("unchecked")
zhangkun835e607852015-01-22 12:31:56 -0800100 private TestServiceServiceDescriptor(
nmittlerf8314582015-01-27 10:25:39 -0800101 java.util.Map<java.lang.String, io.grpc.MethodDescriptor<?, ?>> methodMap) {
102 unaryCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,
103 io.grpc.testing.integration.Test.SimpleResponse>) methodMap.get(
Kun Zhang73acc732015-06-26 16:32:05 -0700104 CONFIG.unaryCall.getFullMethodName());
nmittlerf8314582015-01-27 10:25:39 -0800105 streamingOutputCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
106 io.grpc.testing.integration.Test.StreamingOutputCallResponse>) methodMap.get(
Kun Zhang73acc732015-06-26 16:32:05 -0700107 CONFIG.streamingOutputCall.getFullMethodName());
nmittlerf8314582015-01-27 10:25:39 -0800108 streamingInputCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingInputCallRequest,
109 io.grpc.testing.integration.Test.StreamingInputCallResponse>) methodMap.get(
Kun Zhang73acc732015-06-26 16:32:05 -0700110 CONFIG.streamingInputCall.getFullMethodName());
nmittlerf8314582015-01-27 10:25:39 -0800111 fullDuplexCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
112 io.grpc.testing.integration.Test.StreamingOutputCallResponse>) methodMap.get(
Kun Zhang73acc732015-06-26 16:32:05 -0700113 CONFIG.fullDuplexCall.getFullMethodName());
nmittlerf8314582015-01-27 10:25:39 -0800114 halfDuplexCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
115 io.grpc.testing.integration.Test.StreamingOutputCallResponse>) methodMap.get(
Kun Zhang73acc732015-06-26 16:32:05 -0700116 CONFIG.halfDuplexCall.getFullMethodName());
zhangkun835e607852015-01-22 12:31:56 -0800117 }
118
119 @java.lang.Override
120 protected TestServiceServiceDescriptor build(
nmittlerf8314582015-01-27 10:25:39 -0800121 java.util.Map<java.lang.String, io.grpc.MethodDescriptor<?, ?>> methodMap) {
zhangkun835e607852015-01-22 12:31:56 -0800122 return new TestServiceServiceDescriptor(methodMap);
123 }
124
125 @java.lang.Override
Kun Zhangc73b75e2015-07-09 10:15:58 -0700126 public java.util.Collection<io.grpc.MethodDescriptor<?, ?>> methods() {
nmittlerf8314582015-01-27 10:25:39 -0800127 return com.google.common.collect.ImmutableList.<io.grpc.MethodDescriptor<?, ?>>of(
zhangkun835e607852015-01-22 12:31:56 -0800128 unaryCall,
129 streamingOutputCall,
130 streamingInputCall,
131 fullDuplexCall,
132 halfDuplexCall);
133 }
134 }
135
136 public static interface TestService {
137
nmittlerf8314582015-01-27 10:25:39 -0800138 public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request,
139 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800140
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
nmittlerf8314582015-01-27 10:25:39 -0800144 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
145 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800146
nmittlerf8314582015-01-27 10:25:39 -0800147 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullDuplexCall(
148 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800149
nmittlerf8314582015-01-27 10:25:39 -0800150 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfDuplexCall(
151 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800152 }
153
154 public static interface TestServiceBlockingClient {
155
nmittlerf8314582015-01-27 10:25:39 -0800156 public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request);
zhangkun835e607852015-01-22 12:31:56 -0800157
nmittlerf8314582015-01-27 10:25:39 -0800158 public java.util.Iterator<io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall(
159 io.grpc.testing.integration.Test.StreamingOutputCallRequest request);
zhangkun835e607852015-01-22 12:31:56 -0800160 }
161
162 public static interface TestServiceFutureClient {
163
nmittlerf8314582015-01-27 10:25:39 -0800164 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Test.SimpleResponse> unaryCall(
165 io.grpc.testing.integration.Test.SimpleRequest request);
zhangkun835e607852015-01-22 12:31:56 -0800166 }
167
168 public static class TestServiceStub extends
nmittlerf8314582015-01-27 10:25:39 -0800169 io.grpc.stub.AbstractStub<TestServiceStub, TestServiceServiceDescriptor>
zhangkun835e607852015-01-22 12:31:56 -0800170 implements TestService {
nmittlerf8314582015-01-27 10:25:39 -0800171 private TestServiceStub(io.grpc.Channel channel,
zhangkun835e607852015-01-22 12:31:56 -0800172 TestServiceServiceDescriptor config) {
173 super(channel, config);
174 }
175
Kun Zhangd3c5b002015-06-25 20:24:01 -0700176 private TestServiceStub(io.grpc.Channel channel,
177 TestServiceServiceDescriptor config,
178 io.grpc.CallOptions callOptions) {
179 super(channel, config, callOptions);
180 }
181
zhangkun835e607852015-01-22 12:31:56 -0800182 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800183 protected TestServiceStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700184 TestServiceServiceDescriptor config,
185 io.grpc.CallOptions callOptions) {
186 return new TestServiceStub(channel, config, callOptions);
zhangkun835e607852015-01-22 12:31:56 -0800187 }
188
189 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800190 public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request,
191 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800192 asyncUnaryCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700193 channel.newCall(config.unaryCall, callOptions), request, responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800194 }
195
196 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800197 public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
198 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800199 asyncServerStreamingCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700200 channel.newCall(config.streamingOutputCall, callOptions), request, responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800201 }
202
203 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800204 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
205 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800206 return asyncClientStreamingCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700207 channel.newCall(config.streamingInputCall, callOptions), responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800208 }
209
210 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800211 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullDuplexCall(
212 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800213 return duplexStreamingCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700214 channel.newCall(config.fullDuplexCall, callOptions), responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800215 }
216
217 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800218 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfDuplexCall(
219 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800220 return duplexStreamingCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700221 channel.newCall(config.halfDuplexCall, callOptions), responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800222 }
223 }
224
225 public static class TestServiceBlockingStub extends
nmittlerf8314582015-01-27 10:25:39 -0800226 io.grpc.stub.AbstractStub<TestServiceBlockingStub, TestServiceServiceDescriptor>
zhangkun835e607852015-01-22 12:31:56 -0800227 implements TestServiceBlockingClient {
nmittlerf8314582015-01-27 10:25:39 -0800228 private TestServiceBlockingStub(io.grpc.Channel channel,
zhangkun835e607852015-01-22 12:31:56 -0800229 TestServiceServiceDescriptor config) {
230 super(channel, config);
231 }
232
Kun Zhangd3c5b002015-06-25 20:24:01 -0700233 private TestServiceBlockingStub(io.grpc.Channel channel,
234 TestServiceServiceDescriptor config,
235 io.grpc.CallOptions callOptions) {
236 super(channel, config, callOptions);
237 }
238
zhangkun835e607852015-01-22 12:31:56 -0800239 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800240 protected TestServiceBlockingStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700241 TestServiceServiceDescriptor config,
242 io.grpc.CallOptions callOptions) {
243 return new TestServiceBlockingStub(channel, config, callOptions);
zhangkun835e607852015-01-22 12:31:56 -0800244 }
245
246 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800247 public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request) {
zhangkun835e607852015-01-22 12:31:56 -0800248 return blockingUnaryCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700249 channel.newCall(config.unaryCall, callOptions), request);
zhangkun835e607852015-01-22 12:31:56 -0800250 }
251
252 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800253 public java.util.Iterator<io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall(
254 io.grpc.testing.integration.Test.StreamingOutputCallRequest request) {
zhangkun835e607852015-01-22 12:31:56 -0800255 return blockingServerStreamingCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700256 channel.newCall(config.streamingOutputCall, callOptions), request);
zhangkun835e607852015-01-22 12:31:56 -0800257 }
258 }
259
260 public static class TestServiceFutureStub extends
nmittlerf8314582015-01-27 10:25:39 -0800261 io.grpc.stub.AbstractStub<TestServiceFutureStub, TestServiceServiceDescriptor>
zhangkun835e607852015-01-22 12:31:56 -0800262 implements TestServiceFutureClient {
nmittlerf8314582015-01-27 10:25:39 -0800263 private TestServiceFutureStub(io.grpc.Channel channel,
zhangkun835e607852015-01-22 12:31:56 -0800264 TestServiceServiceDescriptor config) {
265 super(channel, config);
266 }
267
Kun Zhangd3c5b002015-06-25 20:24:01 -0700268 private TestServiceFutureStub(io.grpc.Channel channel,
269 TestServiceServiceDescriptor config,
270 io.grpc.CallOptions callOptions) {
271 super(channel, config, callOptions);
272 }
273
zhangkun835e607852015-01-22 12:31:56 -0800274 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800275 protected TestServiceFutureStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700276 TestServiceServiceDescriptor config,
277 io.grpc.CallOptions callOptions) {
278 return new TestServiceFutureStub(channel, config, callOptions);
zhangkun835e607852015-01-22 12:31:56 -0800279 }
280
281 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800282 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Test.SimpleResponse> unaryCall(
283 io.grpc.testing.integration.Test.SimpleRequest request) {
zhangkun835e607852015-01-22 12:31:56 -0800284 return unaryFutureCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700285 channel.newCall(config.unaryCall, callOptions), request);
zhangkun835e607852015-01-22 12:31:56 -0800286 }
287 }
288
nmittlerf8314582015-01-27 10:25:39 -0800289 public static io.grpc.ServerServiceDefinition bindService(
zhangkun835e607852015-01-22 12:31:56 -0800290 final TestService serviceImpl) {
nmittlerf8314582015-01-27 10:25:39 -0800291 return io.grpc.ServerServiceDefinition.builder("grpc.testing.TestService")
Kun Zhang73acc732015-06-26 16:32:05 -0700292 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800293 METHOD_UNARY_CALL,
Kun Zhang867c76d2015-07-13 17:15:34 -0700294 asyncUnaryCall(
295 new io.grpc.stub.ServerCalls.UnaryMethod<
nmittlerf8314582015-01-27 10:25:39 -0800296 io.grpc.testing.integration.Test.SimpleRequest,
297 io.grpc.testing.integration.Test.SimpleResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800298 @java.lang.Override
299 public void invoke(
nmittlerf8314582015-01-27 10:25:39 -0800300 io.grpc.testing.integration.Test.SimpleRequest request,
301 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800302 serviceImpl.unaryCall(request, responseObserver);
303 }
304 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700305 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800306 METHOD_STREAMING_OUTPUT_CALL,
Kun Zhang867c76d2015-07-13 17:15:34 -0700307 asyncServerStreamingCall(
308 new io.grpc.stub.ServerCalls.ServerStreamingMethod<
nmittlerf8314582015-01-27 10:25:39 -0800309 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
310 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800311 @java.lang.Override
312 public void invoke(
nmittlerf8314582015-01-27 10:25:39 -0800313 io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
314 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800315 serviceImpl.streamingOutputCall(request, responseObserver);
316 }
317 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700318 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800319 METHOD_STREAMING_INPUT_CALL,
Kun Zhang867c76d2015-07-13 17:15:34 -0700320 asyncClientStreamingCall(
321 new io.grpc.stub.ServerCalls.ClientStreamingMethod<
nmittlerf8314582015-01-27 10:25:39 -0800322 io.grpc.testing.integration.Test.StreamingInputCallRequest,
323 io.grpc.testing.integration.Test.StreamingInputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800324 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800325 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> invoke(
326 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800327 return serviceImpl.streamingInputCall(responseObserver);
328 }
329 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700330 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800331 METHOD_FULL_DUPLEX_CALL,
Kun Zhang867c76d2015-07-13 17:15:34 -0700332 asyncDuplexStreamingCall(
333 new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
nmittlerf8314582015-01-27 10:25:39 -0800334 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
335 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800336 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800337 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
338 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800339 return serviceImpl.fullDuplexCall(responseObserver);
340 }
341 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700342 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800343 METHOD_HALF_DUPLEX_CALL,
Kun Zhang867c76d2015-07-13 17:15:34 -0700344 asyncDuplexStreamingCall(
345 new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
nmittlerf8314582015-01-27 10:25:39 -0800346 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
347 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800348 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800349 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
350 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800351 return serviceImpl.halfDuplexCall(responseObserver);
352 }
353 }))).build();
354 }
355}