blob: 4012e40c4350b27fcf6c5c678de914403ef12471 [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 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;
Xiao Hangdcff3152015-02-20 15:03:06 -080015
16import java.io.IOException;
17
18@javax.annotation.Generated("by gRPC proto compiler")
19public class TestServiceGrpc {
20
Eric Andersonbe0d7e92015-09-10 09:47:17 -070021 private TestServiceGrpc() {}
22
David P. Baker66b984c2015-08-21 13:00:26 -040023 public static final String SERVICE_NAME = "grpc.testing.TestService";
24
Kun Zhang73acc732015-06-26 16:32:05 -070025 // Static method descriptors that strictly reflect the proto.
Kun Zhang5bb0ea92015-08-31 09:56:44 -070026 @io.grpc.ExperimentalApi
Kun Zhangbd23a8d2015-08-28 18:47:06 -070027 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.SimpleRequest,
28 io.grpc.testing.integration.nano.Test.SimpleResponse> METHOD_UNARY_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070029 io.grpc.MethodDescriptor.create(
30 io.grpc.MethodDescriptor.MethodType.UNARY,
Kun Zhang042b2782015-08-17 15:43:40 -070031 generateFullMethodName(
32 "grpc.testing.TestService", "UnaryCall"),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070033 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.SimpleRequest>marshaller(
Eric Andersond42559c2015-09-03 17:14:29 -070034 new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.SimpleRequest>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080035 @Override
Eric Andersond42559c2015-09-03 17:14:29 -070036 public io.grpc.testing.integration.nano.Test.SimpleRequest newInstance() {
37 return new io.grpc.testing.integration.nano.Test.SimpleRequest();
Xiao Hangdcff3152015-02-20 15:03:06 -080038 }
39 }),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070040 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.SimpleResponse>marshaller(
Eric Andersond42559c2015-09-03 17:14:29 -070041 new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.SimpleResponse>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080042 @Override
Eric Andersond42559c2015-09-03 17:14:29 -070043 public io.grpc.testing.integration.nano.Test.SimpleResponse newInstance() {
44 return new io.grpc.testing.integration.nano.Test.SimpleResponse();
Xiao Hangdcff3152015-02-20 15:03:06 -080045 }
46 }));
Kun Zhang5bb0ea92015-08-31 09:56:44 -070047 @io.grpc.ExperimentalApi
Kun Zhangbd23a8d2015-08-28 18:47:06 -070048 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
49 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070050 io.grpc.MethodDescriptor.create(
51 io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -070052 generateFullMethodName(
53 "grpc.testing.TestService", "StreamingOutputCall"),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070054 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller(
Eric Andersond42559c2015-09-03 17:14:29 -070055 new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080056 @Override
Eric Andersond42559c2015-09-03 17:14:29 -070057 public io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest newInstance() {
58 return new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest();
Xiao Hangdcff3152015-02-20 15:03:06 -080059 }
60 }),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070061 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller(
Eric Andersond42559c2015-09-03 17:14:29 -070062 new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080063 @Override
Eric Andersond42559c2015-09-03 17:14:29 -070064 public io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse newInstance() {
65 return new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse();
Xiao Hangdcff3152015-02-20 15:03:06 -080066 }
67 }));
Kun Zhang5bb0ea92015-08-31 09:56:44 -070068 @io.grpc.ExperimentalApi
Kun Zhangbd23a8d2015-08-28 18:47:06 -070069 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest,
70 io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070071 io.grpc.MethodDescriptor.create(
72 io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -070073 generateFullMethodName(
74 "grpc.testing.TestService", "StreamingInputCall"),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070075 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest>marshaller(
Eric Andersond42559c2015-09-03 17:14:29 -070076 new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080077 @Override
Eric Andersond42559c2015-09-03 17:14:29 -070078 public io.grpc.testing.integration.nano.Test.StreamingInputCallRequest newInstance() {
79 return new io.grpc.testing.integration.nano.Test.StreamingInputCallRequest();
Xiao Hangdcff3152015-02-20 15:03:06 -080080 }
81 }),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070082 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>marshaller(
Eric Andersond42559c2015-09-03 17:14:29 -070083 new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080084 @Override
Eric Andersond42559c2015-09-03 17:14:29 -070085 public io.grpc.testing.integration.nano.Test.StreamingInputCallResponse newInstance() {
86 return new io.grpc.testing.integration.nano.Test.StreamingInputCallResponse();
Xiao Hangdcff3152015-02-20 15:03:06 -080087 }
88 }));
Kun Zhang5bb0ea92015-08-31 09:56:44 -070089 @io.grpc.ExperimentalApi
Kun Zhangbd23a8d2015-08-28 18:47:06 -070090 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
91 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_FULL_BIDI_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -070092 io.grpc.MethodDescriptor.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -070093 io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -070094 generateFullMethodName(
95 "grpc.testing.TestService", "FullBidiCall"),
Kun Zhangbd23a8d2015-08-28 18:47:06 -070096 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller(
Eric Andersond42559c2015-09-03 17:14:29 -070097 new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>() {
Xiao Hangdcff3152015-02-20 15:03:06 -080098 @Override
Eric Andersond42559c2015-09-03 17:14:29 -070099 public io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest newInstance() {
100 return new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest();
Xiao Hangdcff3152015-02-20 15:03:06 -0800101 }
102 }),
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700103 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller(
Eric Andersond42559c2015-09-03 17:14:29 -0700104 new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() {
Xiao Hangdcff3152015-02-20 15:03:06 -0800105 @Override
Eric Andersond42559c2015-09-03 17:14:29 -0700106 public io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse newInstance() {
107 return new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse();
Xiao Hangdcff3152015-02-20 15:03:06 -0800108 }
109 }));
Kun Zhang5bb0ea92015-08-31 09:56:44 -0700110 @io.grpc.ExperimentalApi
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700111 public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
112 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_HALF_BIDI_CALL =
Kun Zhang73acc732015-06-26 16:32:05 -0700113 io.grpc.MethodDescriptor.create(
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700114 io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
Kun Zhang042b2782015-08-17 15:43:40 -0700115 generateFullMethodName(
116 "grpc.testing.TestService", "HalfBidiCall"),
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700117 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller(
Eric Andersond42559c2015-09-03 17:14:29 -0700118 new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>() {
Xiao Hangdcff3152015-02-20 15:03:06 -0800119 @Override
Eric Andersond42559c2015-09-03 17:14:29 -0700120 public io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest newInstance() {
121 return new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest();
Xiao Hangdcff3152015-02-20 15:03:06 -0800122 }
123 }),
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700124 io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller(
Eric Andersond42559c2015-09-03 17:14:29 -0700125 new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() {
Xiao Hangdcff3152015-02-20 15:03:06 -0800126 @Override
Eric Andersond42559c2015-09-03 17:14:29 -0700127 public io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse newInstance() {
128 return new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse();
Xiao Hangdcff3152015-02-20 15:03:06 -0800129 }
130 }));
131
132 public static TestServiceStub newStub(io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -0700133 return new TestServiceStub(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800134 }
135
136 public static TestServiceBlockingStub newBlockingStub(
137 io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -0700138 return new TestServiceBlockingStub(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800139 }
140
141 public static TestServiceFutureStub newFutureStub(
142 io.grpc.Channel channel) {
Kun Zhangeb929672015-07-17 17:02:58 -0700143 return new TestServiceFutureStub(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800144 }
145
146 public static interface TestService {
147
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700148 public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request,
149 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.SimpleResponse> responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800150
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700151 public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request,
152 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800153
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700154 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest> streamingInputCall(
155 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800156
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700157 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> fullBidiCall(
158 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800159
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700160 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> halfBidiCall(
161 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800162 }
163
164 public static interface TestServiceBlockingClient {
165
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700166 public io.grpc.testing.integration.nano.Test.SimpleResponse unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800167
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700168 public java.util.Iterator<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> streamingOutputCall(
169 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800170 }
171
172 public static interface TestServiceFutureClient {
173
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700174 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.nano.Test.SimpleResponse> unaryCall(
175 io.grpc.testing.integration.nano.Test.SimpleRequest request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800176 }
177
Kun Zhangeb929672015-07-17 17:02:58 -0700178 public static class TestServiceStub extends io.grpc.stub.AbstractStub<TestServiceStub>
Xiao Hangdcff3152015-02-20 15:03:06 -0800179 implements TestService {
Kun Zhangeb929672015-07-17 17:02:58 -0700180 private TestServiceStub(io.grpc.Channel channel) {
181 super(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800182 }
183
Kun Zhangd3c5b002015-06-25 20:24:01 -0700184 private TestServiceStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700185 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700186 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700187 }
188
Xiao Hangdcff3152015-02-20 15:03:06 -0800189 @java.lang.Override
190 protected TestServiceStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700191 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700192 return new TestServiceStub(channel, callOptions);
Xiao Hangdcff3152015-02-20 15:03:06 -0800193 }
194
195 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700196 public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request,
197 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.SimpleResponse> responseObserver) {
Xiao Hangdcff3152015-02-20 15:03:06 -0800198 asyncUnaryCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700199 getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request, responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800200 }
201
202 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700203 public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request,
204 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
Xiao Hangdcff3152015-02-20 15:03:06 -0800205 asyncServerStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700206 getChannel().newCall(METHOD_STREAMING_OUTPUT_CALL, getCallOptions()), request, responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800207 }
208
209 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700210 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest> streamingInputCall(
211 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> responseObserver) {
Xiao Hangdcff3152015-02-20 15:03:06 -0800212 return asyncClientStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700213 getChannel().newCall(METHOD_STREAMING_INPUT_CALL, getCallOptions()), responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800214 }
215
216 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700217 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> fullBidiCall(
218 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700219 return asyncBidiStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700220 getChannel().newCall(METHOD_FULL_BIDI_CALL, getCallOptions()), responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800221 }
222
223 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700224 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> halfBidiCall(
225 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
Carl Mastrangelo67fc45d2015-08-05 13:56:50 -0700226 return asyncBidiStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700227 getChannel().newCall(METHOD_HALF_BIDI_CALL, getCallOptions()), responseObserver);
Xiao Hangdcff3152015-02-20 15:03:06 -0800228 }
229 }
230
Kun Zhangeb929672015-07-17 17:02:58 -0700231 public static class TestServiceBlockingStub extends io.grpc.stub.AbstractStub<TestServiceBlockingStub>
Xiao Hangdcff3152015-02-20 15:03:06 -0800232 implements TestServiceBlockingClient {
Kun Zhangeb929672015-07-17 17:02:58 -0700233 private TestServiceBlockingStub(io.grpc.Channel channel) {
234 super(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800235 }
236
Kun Zhangd3c5b002015-06-25 20:24:01 -0700237 private TestServiceBlockingStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700238 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700239 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700240 }
241
Xiao Hangdcff3152015-02-20 15:03:06 -0800242 @java.lang.Override
243 protected TestServiceBlockingStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700244 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700245 return new TestServiceBlockingStub(channel, callOptions);
Xiao Hangdcff3152015-02-20 15:03:06 -0800246 }
247
248 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700249 public io.grpc.testing.integration.nano.Test.SimpleResponse unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request) {
Xiao Hangdcff3152015-02-20 15:03:06 -0800250 return blockingUnaryCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700251 getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800252 }
253
254 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700255 public java.util.Iterator<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> streamingOutputCall(
256 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request) {
Xiao Hangdcff3152015-02-20 15:03:06 -0800257 return blockingServerStreamingCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700258 getChannel().newCall(METHOD_STREAMING_OUTPUT_CALL, getCallOptions()), request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800259 }
260 }
261
Kun Zhangeb929672015-07-17 17:02:58 -0700262 public static class TestServiceFutureStub extends io.grpc.stub.AbstractStub<TestServiceFutureStub>
Xiao Hangdcff3152015-02-20 15:03:06 -0800263 implements TestServiceFutureClient {
Kun Zhangeb929672015-07-17 17:02:58 -0700264 private TestServiceFutureStub(io.grpc.Channel channel) {
265 super(channel);
Xiao Hangdcff3152015-02-20 15:03:06 -0800266 }
267
Kun Zhangd3c5b002015-06-25 20:24:01 -0700268 private TestServiceFutureStub(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700269 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700270 super(channel, callOptions);
Kun Zhangd3c5b002015-06-25 20:24:01 -0700271 }
272
Xiao Hangdcff3152015-02-20 15:03:06 -0800273 @java.lang.Override
274 protected TestServiceFutureStub build(io.grpc.Channel channel,
Kun Zhangd3c5b002015-06-25 20:24:01 -0700275 io.grpc.CallOptions callOptions) {
Kun Zhangeb929672015-07-17 17:02:58 -0700276 return new TestServiceFutureStub(channel, callOptions);
Xiao Hangdcff3152015-02-20 15:03:06 -0800277 }
278
279 @java.lang.Override
Kun Zhangbd23a8d2015-08-28 18:47:06 -0700280 public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.nano.Test.SimpleResponse> unaryCall(
281 io.grpc.testing.integration.nano.Test.SimpleRequest request) {
Kun Zhang686dcff2015-07-16 12:34:37 -0700282 return futureUnaryCall(
Eric Anderson23e63182015-09-10 08:36:08 -0700283 getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request);
Xiao Hangdcff3152015-02-20 15:03:06 -0800284 }
285 }
286
287 public static io.grpc.ServerServiceDefinition bindService(
288 final TestService serviceImpl) {
David P. Baker66b984c2015-08-21 13:00:26 -0400289 return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME)
Eric Andersona6621da2015-09-10 17:37:21 -0700290 .addMethod(
291 METHOD_UNARY_CALL,
292 asyncUnaryCall(
293 new io.grpc.stub.ServerCalls.UnaryMethod<
294 io.grpc.testing.integration.nano.Test.SimpleRequest,
295 io.grpc.testing.integration.nano.Test.SimpleResponse>() {
296 @java.lang.Override
297 public void invoke(
298 io.grpc.testing.integration.nano.Test.SimpleRequest request,
299 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.SimpleResponse> responseObserver) {
300 serviceImpl.unaryCall(request, responseObserver);
301 }
302 }))
303 .addMethod(
304 METHOD_STREAMING_OUTPUT_CALL,
305 asyncServerStreamingCall(
306 new io.grpc.stub.ServerCalls.ServerStreamingMethod<
307 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
308 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() {
309 @java.lang.Override
310 public void invoke(
311 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request,
312 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
313 serviceImpl.streamingOutputCall(request, responseObserver);
314 }
315 }))
316 .addMethod(
317 METHOD_STREAMING_INPUT_CALL,
318 asyncClientStreamingCall(
319 new io.grpc.stub.ServerCalls.ClientStreamingMethod<
320 io.grpc.testing.integration.nano.Test.StreamingInputCallRequest,
321 io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>() {
322 @java.lang.Override
323 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest> invoke(
324 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> responseObserver) {
325 return serviceImpl.streamingInputCall(responseObserver);
326 }
327 }))
328 .addMethod(
329 METHOD_FULL_BIDI_CALL,
330 asyncBidiStreamingCall(
331 new io.grpc.stub.ServerCalls.BidiStreamingMethod<
332 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
333 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() {
334 @java.lang.Override
335 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> invoke(
336 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
337 return serviceImpl.fullBidiCall(responseObserver);
338 }
339 }))
340 .addMethod(
341 METHOD_HALF_BIDI_CALL,
342 asyncBidiStreamingCall(
343 new io.grpc.stub.ServerCalls.BidiStreamingMethod<
344 io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest,
345 io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() {
346 @java.lang.Override
347 public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> invoke(
348 io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) {
349 return serviceImpl.halfBidiCall(responseObserver);
350 }
351 })).build();
Xiao Hangdcff3152015-02-20 15:03:06 -0800352 }
353}