blob: cb3baf61ac4f66e7cdf45e2d554faca0f6fe8359 [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;
nmittlerf8314582015-01-27 10:25:39 -080010import static io.grpc.stub.ServerCalls.asyncUnaryRequestCall;
11import static io.grpc.stub.ServerCalls.asyncStreamingRequestCall;
zhangkun835e607852015-01-22 12:31:56 -080012
13@javax.annotation.Generated("by gRPC proto compiler")
14public class TestServiceGrpc {
15
Kun Zhang73acc732015-06-26 16:32:05 -070016 // Static method descriptors that strictly reflect the proto.
17 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,
nmittlerf8314582015-01-27 10:25:39 -080018 io.grpc.testing.integration.Test.SimpleResponse> METHOD_UNARY_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070019 io.grpc.MethodDescriptor.create(
20 io.grpc.MethodDescriptor.MethodType.UNARY,
21 "grpc.testing.TestService", "UnaryCall",
22 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleRequest.PARSER),
23 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleResponse.PARSER));
24 // Static method descriptors that strictly reflect the proto.
25 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
nmittlerf8314582015-01-27 10:25:39 -080026 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070027 io.grpc.MethodDescriptor.create(
28 io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
29 "grpc.testing.TestService", "StreamingOutputCall",
30 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER),
31 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER));
32 // Static method descriptors that strictly reflect the proto.
33 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingInputCallRequest,
nmittlerf8314582015-01-27 10:25:39 -080034 io.grpc.testing.integration.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070035 io.grpc.MethodDescriptor.create(
36 io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING,
37 "grpc.testing.TestService", "StreamingInputCall",
38 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallRequest.PARSER),
39 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallResponse.PARSER));
40 // Static method descriptors that strictly reflect the proto.
41 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
nmittlerf8314582015-01-27 10:25:39 -080042 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_DUPLEX_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070043 io.grpc.MethodDescriptor.create(
44 io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
45 "grpc.testing.TestService", "FullDuplexCall",
46 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER),
47 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER));
48 // Static method descriptors that strictly reflect the proto.
49 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
nmittlerf8314582015-01-27 10:25:39 -080050 io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_DUPLEX_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070051 io.grpc.MethodDescriptor.create(
52 io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
53 "grpc.testing.TestService", "HalfDuplexCall",
54 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER),
55 io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER));
zhangkun835e607852015-01-22 12:31:56 -080056
nmittlerf8314582015-01-27 10:25:39 -080057 public static TestServiceStub newStub(io.grpc.Channel channel) {
zhangkun835e607852015-01-22 12:31:56 -080058 return new TestServiceStub(channel, CONFIG);
59 }
60
61 public static TestServiceBlockingStub newBlockingStub(
nmittlerf8314582015-01-27 10:25:39 -080062 io.grpc.Channel channel) {
zhangkun835e607852015-01-22 12:31:56 -080063 return new TestServiceBlockingStub(channel, CONFIG);
64 }
65
66 public static TestServiceFutureStub newFutureStub(
nmittlerf8314582015-01-27 10:25:39 -080067 io.grpc.Channel channel) {
zhangkun835e607852015-01-22 12:31:56 -080068 return new TestServiceFutureStub(channel, CONFIG);
69 }
70
Kun Zhang73acc732015-06-26 16:32:05 -070071 // The default service descriptor
72 private static final TestServiceServiceDescriptor CONFIG =
zhangkun835e607852015-01-22 12:31:56 -080073 new TestServiceServiceDescriptor();
74
75 @javax.annotation.concurrent.Immutable
76 public static class TestServiceServiceDescriptor extends
nmittlerf8314582015-01-27 10:25:39 -080077 io.grpc.stub.AbstractServiceDescriptor<TestServiceServiceDescriptor> {
78 public final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,
79 io.grpc.testing.integration.Test.SimpleResponse> unaryCall;
80 public final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
81 io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall;
82 public final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingInputCallRequest,
83 io.grpc.testing.integration.Test.StreamingInputCallResponse> streamingInputCall;
84 public final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
85 io.grpc.testing.integration.Test.StreamingOutputCallResponse> fullDuplexCall;
86 public final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
87 io.grpc.testing.integration.Test.StreamingOutputCallResponse> halfDuplexCall;
zhangkun835e607852015-01-22 12:31:56 -080088
89 private TestServiceServiceDescriptor() {
Kun Zhang73acc732015-06-26 16:32:05 -070090 unaryCall = METHOD_UNARY_CALL;
91 streamingOutputCall = METHOD_STREAMING_OUTPUT_CALL;
92 streamingInputCall = METHOD_STREAMING_INPUT_CALL;
93 fullDuplexCall = METHOD_FULL_DUPLEX_CALL;
94 halfDuplexCall = METHOD_HALF_DUPLEX_CALL;
zhangkun835e607852015-01-22 12:31:56 -080095 }
96
Eric Anderson76d09552015-03-12 15:25:11 -070097 @SuppressWarnings("unchecked")
zhangkun835e607852015-01-22 12:31:56 -080098 private TestServiceServiceDescriptor(
nmittlerf8314582015-01-27 10:25:39 -080099 java.util.Map<java.lang.String, io.grpc.MethodDescriptor<?, ?>> methodMap) {
100 unaryCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,
101 io.grpc.testing.integration.Test.SimpleResponse>) methodMap.get(
Kun Zhang73acc732015-06-26 16:32:05 -0700102 CONFIG.unaryCall.getFullMethodName());
nmittlerf8314582015-01-27 10:25:39 -0800103 streamingOutputCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
104 io.grpc.testing.integration.Test.StreamingOutputCallResponse>) methodMap.get(
Kun Zhang73acc732015-06-26 16:32:05 -0700105 CONFIG.streamingOutputCall.getFullMethodName());
nmittlerf8314582015-01-27 10:25:39 -0800106 streamingInputCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingInputCallRequest,
107 io.grpc.testing.integration.Test.StreamingInputCallResponse>) methodMap.get(
Kun Zhang73acc732015-06-26 16:32:05 -0700108 CONFIG.streamingInputCall.getFullMethodName());
nmittlerf8314582015-01-27 10:25:39 -0800109 fullDuplexCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
110 io.grpc.testing.integration.Test.StreamingOutputCallResponse>) methodMap.get(
Kun Zhang73acc732015-06-26 16:32:05 -0700111 CONFIG.fullDuplexCall.getFullMethodName());
nmittlerf8314582015-01-27 10:25:39 -0800112 halfDuplexCall = (io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
113 io.grpc.testing.integration.Test.StreamingOutputCallResponse>) methodMap.get(
Kun Zhang73acc732015-06-26 16:32:05 -0700114 CONFIG.halfDuplexCall.getFullMethodName());
zhangkun835e607852015-01-22 12:31:56 -0800115 }
116
117 @java.lang.Override
118 protected TestServiceServiceDescriptor build(
nmittlerf8314582015-01-27 10:25:39 -0800119 java.util.Map<java.lang.String, io.grpc.MethodDescriptor<?, ?>> methodMap) {
zhangkun835e607852015-01-22 12:31:56 -0800120 return new TestServiceServiceDescriptor(methodMap);
121 }
122
123 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800124 public com.google.common.collect.ImmutableList<io.grpc.MethodDescriptor<?, ?>> methods() {
125 return com.google.common.collect.ImmutableList.<io.grpc.MethodDescriptor<?, ?>>of(
zhangkun835e607852015-01-22 12:31:56 -0800126 unaryCall,
127 streamingOutputCall,
128 streamingInputCall,
129 fullDuplexCall,
130 halfDuplexCall);
131 }
132 }
133
134 public static interface TestService {
135
nmittlerf8314582015-01-27 10:25:39 -0800136 public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request,
137 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800138
nmittlerf8314582015-01-27 10:25:39 -0800139 public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
140 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800141
nmittlerf8314582015-01-27 10:25:39 -0800142 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
143 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800144
nmittlerf8314582015-01-27 10:25:39 -0800145 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullDuplexCall(
146 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800147
nmittlerf8314582015-01-27 10:25:39 -0800148 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfDuplexCall(
149 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800150 }
151
152 public static interface TestServiceBlockingClient {
153
nmittlerf8314582015-01-27 10:25:39 -0800154 public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request);
zhangkun835e607852015-01-22 12:31:56 -0800155
nmittlerf8314582015-01-27 10:25:39 -0800156 public java.util.Iterator<io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall(
157 io.grpc.testing.integration.Test.StreamingOutputCallRequest request);
zhangkun835e607852015-01-22 12:31:56 -0800158 }
159
160 public static interface TestServiceFutureClient {
161
nmittlerf8314582015-01-27 10:25:39 -0800162 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Test.SimpleResponse> unaryCall(
163 io.grpc.testing.integration.Test.SimpleRequest request);
zhangkun835e607852015-01-22 12:31:56 -0800164 }
165
166 public static class TestServiceStub extends
nmittlerf8314582015-01-27 10:25:39 -0800167 io.grpc.stub.AbstractStub<TestServiceStub, TestServiceServiceDescriptor>
zhangkun835e607852015-01-22 12:31:56 -0800168 implements TestService {
nmittlerf8314582015-01-27 10:25:39 -0800169 private TestServiceStub(io.grpc.Channel channel,
zhangkun835e607852015-01-22 12:31:56 -0800170 TestServiceServiceDescriptor config) {
171 super(channel, config);
172 }
173
Kun Zhangd3c5b002015-06-25 20:24:01 -0700174 private TestServiceStub(io.grpc.Channel channel,
175 TestServiceServiceDescriptor config,
176 io.grpc.CallOptions callOptions) {
177 super(channel, config, callOptions);
178 }
179
zhangkun835e607852015-01-22 12:31:56 -0800180 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800181 protected TestServiceStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700182 TestServiceServiceDescriptor config,
183 io.grpc.CallOptions callOptions) {
184 return new TestServiceStub(channel, config, callOptions);
zhangkun835e607852015-01-22 12:31:56 -0800185 }
186
187 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800188 public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request,
189 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800190 asyncUnaryCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700191 channel.newCall(config.unaryCall, callOptions), request, responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800192 }
193
194 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800195 public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
196 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800197 asyncServerStreamingCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700198 channel.newCall(config.streamingOutputCall, callOptions), request, responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800199 }
200
201 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800202 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
203 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800204 return asyncClientStreamingCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700205 channel.newCall(config.streamingInputCall, callOptions), responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800206 }
207
208 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800209 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullDuplexCall(
210 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800211 return duplexStreamingCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700212 channel.newCall(config.fullDuplexCall, callOptions), responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800213 }
214
215 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800216 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfDuplexCall(
217 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800218 return duplexStreamingCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700219 channel.newCall(config.halfDuplexCall, callOptions), responseObserver);
zhangkun835e607852015-01-22 12:31:56 -0800220 }
221 }
222
223 public static class TestServiceBlockingStub extends
nmittlerf8314582015-01-27 10:25:39 -0800224 io.grpc.stub.AbstractStub<TestServiceBlockingStub, TestServiceServiceDescriptor>
zhangkun835e607852015-01-22 12:31:56 -0800225 implements TestServiceBlockingClient {
nmittlerf8314582015-01-27 10:25:39 -0800226 private TestServiceBlockingStub(io.grpc.Channel channel,
zhangkun835e607852015-01-22 12:31:56 -0800227 TestServiceServiceDescriptor config) {
228 super(channel, config);
229 }
230
Kun Zhangd3c5b002015-06-25 20:24:01 -0700231 private TestServiceBlockingStub(io.grpc.Channel channel,
232 TestServiceServiceDescriptor config,
233 io.grpc.CallOptions callOptions) {
234 super(channel, config, callOptions);
235 }
236
zhangkun835e607852015-01-22 12:31:56 -0800237 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800238 protected TestServiceBlockingStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700239 TestServiceServiceDescriptor config,
240 io.grpc.CallOptions callOptions) {
241 return new TestServiceBlockingStub(channel, config, callOptions);
zhangkun835e607852015-01-22 12:31:56 -0800242 }
243
244 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800245 public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request) {
zhangkun835e607852015-01-22 12:31:56 -0800246 return blockingUnaryCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700247 channel.newCall(config.unaryCall, callOptions), request);
zhangkun835e607852015-01-22 12:31:56 -0800248 }
249
250 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800251 public java.util.Iterator<io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall(
252 io.grpc.testing.integration.Test.StreamingOutputCallRequest request) {
zhangkun835e607852015-01-22 12:31:56 -0800253 return blockingServerStreamingCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700254 channel.newCall(config.streamingOutputCall, callOptions), request);
zhangkun835e607852015-01-22 12:31:56 -0800255 }
256 }
257
258 public static class TestServiceFutureStub extends
nmittlerf8314582015-01-27 10:25:39 -0800259 io.grpc.stub.AbstractStub<TestServiceFutureStub, TestServiceServiceDescriptor>
zhangkun835e607852015-01-22 12:31:56 -0800260 implements TestServiceFutureClient {
nmittlerf8314582015-01-27 10:25:39 -0800261 private TestServiceFutureStub(io.grpc.Channel channel,
zhangkun835e607852015-01-22 12:31:56 -0800262 TestServiceServiceDescriptor config) {
263 super(channel, config);
264 }
265
Kun Zhangd3c5b002015-06-25 20:24:01 -0700266 private TestServiceFutureStub(io.grpc.Channel channel,
267 TestServiceServiceDescriptor config,
268 io.grpc.CallOptions callOptions) {
269 super(channel, config, callOptions);
270 }
271
zhangkun835e607852015-01-22 12:31:56 -0800272 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800273 protected TestServiceFutureStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700274 TestServiceServiceDescriptor config,
275 io.grpc.CallOptions callOptions) {
276 return new TestServiceFutureStub(channel, config, callOptions);
zhangkun835e607852015-01-22 12:31:56 -0800277 }
278
279 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800280 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Test.SimpleResponse> unaryCall(
281 io.grpc.testing.integration.Test.SimpleRequest request) {
zhangkun835e607852015-01-22 12:31:56 -0800282 return unaryFutureCall(
Kun Zhangd3c5b002015-06-25 20:24:01 -0700283 channel.newCall(config.unaryCall, callOptions), request);
zhangkun835e607852015-01-22 12:31:56 -0800284 }
285 }
286
nmittlerf8314582015-01-27 10:25:39 -0800287 public static io.grpc.ServerServiceDefinition bindService(
zhangkun835e607852015-01-22 12:31:56 -0800288 final TestService serviceImpl) {
nmittlerf8314582015-01-27 10:25:39 -0800289 return io.grpc.ServerServiceDefinition.builder("grpc.testing.TestService")
Kun Zhang73acc732015-06-26 16:32:05 -0700290 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800291 METHOD_UNARY_CALL,
292 asyncUnaryRequestCall(
nmittlerf8314582015-01-27 10:25:39 -0800293 new io.grpc.stub.ServerCalls.UnaryRequestMethod<
294 io.grpc.testing.integration.Test.SimpleRequest,
295 io.grpc.testing.integration.Test.SimpleResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800296 @java.lang.Override
297 public void invoke(
nmittlerf8314582015-01-27 10:25:39 -0800298 io.grpc.testing.integration.Test.SimpleRequest request,
299 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800300 serviceImpl.unaryCall(request, responseObserver);
301 }
302 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700303 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800304 METHOD_STREAMING_OUTPUT_CALL,
305 asyncUnaryRequestCall(
nmittlerf8314582015-01-27 10:25:39 -0800306 new io.grpc.stub.ServerCalls.UnaryRequestMethod<
307 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
308 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800309 @java.lang.Override
310 public void invoke(
nmittlerf8314582015-01-27 10:25:39 -0800311 io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
312 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800313 serviceImpl.streamingOutputCall(request, responseObserver);
314 }
315 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700316 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800317 METHOD_STREAMING_INPUT_CALL,
318 asyncStreamingRequestCall(
nmittlerf8314582015-01-27 10:25:39 -0800319 new io.grpc.stub.ServerCalls.StreamingRequestMethod<
320 io.grpc.testing.integration.Test.StreamingInputCallRequest,
321 io.grpc.testing.integration.Test.StreamingInputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800322 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800323 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> invoke(
324 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800325 return serviceImpl.streamingInputCall(responseObserver);
326 }
327 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700328 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800329 METHOD_FULL_DUPLEX_CALL,
330 asyncStreamingRequestCall(
nmittlerf8314582015-01-27 10:25:39 -0800331 new io.grpc.stub.ServerCalls.StreamingRequestMethod<
332 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
333 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800334 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800335 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
336 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800337 return serviceImpl.fullDuplexCall(responseObserver);
338 }
339 })))
Kun Zhang73acc732015-06-26 16:32:05 -0700340 .addMethod(io.grpc.ServerMethodDefinition.create(
zhangkun835e607852015-01-22 12:31:56 -0800341 METHOD_HALF_DUPLEX_CALL,
342 asyncStreamingRequestCall(
nmittlerf8314582015-01-27 10:25:39 -0800343 new io.grpc.stub.ServerCalls.StreamingRequestMethod<
344 io.grpc.testing.integration.Test.StreamingOutputCallRequest,
345 io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
zhangkun835e607852015-01-22 12:31:56 -0800346 @java.lang.Override
nmittlerf8314582015-01-27 10:25:39 -0800347 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
348 io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
zhangkun835e607852015-01-22 12:31:56 -0800349 return serviceImpl.halfDuplexCall(responseObserver);
350 }
351 }))).build();
352 }
353}