• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package io.grpc.testing.integration;
2 
3 import static io.grpc.MethodDescriptor.generateFullMethodName;
4 import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
5 import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
6 import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
7 import static io.grpc.stub.ClientCalls.asyncUnaryCall;
8 import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
9 import static io.grpc.stub.ClientCalls.blockingUnaryCall;
10 import static io.grpc.stub.ClientCalls.futureUnaryCall;
11 import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
12 import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
13 import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
14 import static io.grpc.stub.ServerCalls.asyncUnaryCall;
15 import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
16 import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
17 
18 /**
19  * <pre>
20  * A simple service to test the various types of RPCs and experiment with
21  * performance with various types of payload.
22  * </pre>
23  */
24 @javax.annotation.Generated(
25     value = "by gRPC proto compiler",
26     comments = "Source: grpc/testing/test.proto")
27 public final class TestServiceGrpc {
28 
TestServiceGrpc()29   private TestServiceGrpc() {}
30 
31   public static final String SERVICE_NAME = "grpc.testing.TestService";
32 
33   // Static method descriptors that strictly reflect the proto.
34   private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
35       io.grpc.testing.integration.EmptyProtos.Empty> getEmptyCallMethod;
36 
37   @io.grpc.stub.annotations.RpcMethod(
38       fullMethodName = SERVICE_NAME + '/' + "EmptyCall",
39       requestType = io.grpc.testing.integration.EmptyProtos.Empty.class,
40       responseType = io.grpc.testing.integration.EmptyProtos.Empty.class,
41       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
42   public static io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
getEmptyCallMethod()43       io.grpc.testing.integration.EmptyProtos.Empty> getEmptyCallMethod() {
44     io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty> getEmptyCallMethod;
45     if ((getEmptyCallMethod = TestServiceGrpc.getEmptyCallMethod) == null) {
46       synchronized (TestServiceGrpc.class) {
47         if ((getEmptyCallMethod = TestServiceGrpc.getEmptyCallMethod) == null) {
48           TestServiceGrpc.getEmptyCallMethod = getEmptyCallMethod =
49               io.grpc.MethodDescriptor.<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty>newBuilder()
50               .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
51               .setFullMethodName(generateFullMethodName(
52                   "grpc.testing.TestService", "EmptyCall"))
53               .setSampledToLocalTracing(true)
54               .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
55                   io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
56               .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
57                   io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
58                   .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("EmptyCall"))
59                   .build();
60           }
61         }
62      }
63      return getEmptyCallMethod;
64   }
65 
66   private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.SimpleRequest,
67       io.grpc.testing.integration.Messages.SimpleResponse> getUnaryCallMethod;
68 
69   @io.grpc.stub.annotations.RpcMethod(
70       fullMethodName = SERVICE_NAME + '/' + "UnaryCall",
71       requestType = io.grpc.testing.integration.Messages.SimpleRequest.class,
72       responseType = io.grpc.testing.integration.Messages.SimpleResponse.class,
73       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
74   public static io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.SimpleRequest,
getUnaryCallMethod()75       io.grpc.testing.integration.Messages.SimpleResponse> getUnaryCallMethod() {
76     io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.SimpleRequest, io.grpc.testing.integration.Messages.SimpleResponse> getUnaryCallMethod;
77     if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) {
78       synchronized (TestServiceGrpc.class) {
79         if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) {
80           TestServiceGrpc.getUnaryCallMethod = getUnaryCallMethod =
81               io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.SimpleRequest, io.grpc.testing.integration.Messages.SimpleResponse>newBuilder()
82               .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
83               .setFullMethodName(generateFullMethodName(
84                   "grpc.testing.TestService", "UnaryCall"))
85               .setSampledToLocalTracing(true)
86               .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
87                   io.grpc.testing.integration.Messages.SimpleRequest.getDefaultInstance()))
88               .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
89                   io.grpc.testing.integration.Messages.SimpleResponse.getDefaultInstance()))
90                   .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("UnaryCall"))
91                   .build();
92           }
93         }
94      }
95      return getUnaryCallMethod;
96   }
97 
98   private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.SimpleRequest,
99       io.grpc.testing.integration.Messages.SimpleResponse> getCacheableUnaryCallMethod;
100 
101   @io.grpc.stub.annotations.RpcMethod(
102       fullMethodName = SERVICE_NAME + '/' + "CacheableUnaryCall",
103       requestType = io.grpc.testing.integration.Messages.SimpleRequest.class,
104       responseType = io.grpc.testing.integration.Messages.SimpleResponse.class,
105       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
106   public static io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.SimpleRequest,
getCacheableUnaryCallMethod()107       io.grpc.testing.integration.Messages.SimpleResponse> getCacheableUnaryCallMethod() {
108     io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.SimpleRequest, io.grpc.testing.integration.Messages.SimpleResponse> getCacheableUnaryCallMethod;
109     if ((getCacheableUnaryCallMethod = TestServiceGrpc.getCacheableUnaryCallMethod) == null) {
110       synchronized (TestServiceGrpc.class) {
111         if ((getCacheableUnaryCallMethod = TestServiceGrpc.getCacheableUnaryCallMethod) == null) {
112           TestServiceGrpc.getCacheableUnaryCallMethod = getCacheableUnaryCallMethod =
113               io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.SimpleRequest, io.grpc.testing.integration.Messages.SimpleResponse>newBuilder()
114               .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
115               .setFullMethodName(generateFullMethodName(
116                   "grpc.testing.TestService", "CacheableUnaryCall"))
117               .setSampledToLocalTracing(true)
118               .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
119                   io.grpc.testing.integration.Messages.SimpleRequest.getDefaultInstance()))
120               .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
121                   io.grpc.testing.integration.Messages.SimpleResponse.getDefaultInstance()))
122                   .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("CacheableUnaryCall"))
123                   .build();
124           }
125         }
126      }
127      return getCacheableUnaryCallMethod;
128   }
129 
130   private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
131       io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getStreamingOutputCallMethod;
132 
133   @io.grpc.stub.annotations.RpcMethod(
134       fullMethodName = SERVICE_NAME + '/' + "StreamingOutputCall",
135       requestType = io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class,
136       responseType = io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class,
137       methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
138   public static io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
getStreamingOutputCallMethod()139       io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getStreamingOutputCallMethod() {
140     io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getStreamingOutputCallMethod;
141     if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) {
142       synchronized (TestServiceGrpc.class) {
143         if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) {
144           TestServiceGrpc.getStreamingOutputCallMethod = getStreamingOutputCallMethod =
145               io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>newBuilder()
146               .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
147               .setFullMethodName(generateFullMethodName(
148                   "grpc.testing.TestService", "StreamingOutputCall"))
149               .setSampledToLocalTracing(true)
150               .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
151                   io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance()))
152               .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
153                   io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance()))
154                   .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("StreamingOutputCall"))
155                   .build();
156           }
157         }
158      }
159      return getStreamingOutputCallMethod;
160   }
161 
162   private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingInputCallRequest,
163       io.grpc.testing.integration.Messages.StreamingInputCallResponse> getStreamingInputCallMethod;
164 
165   @io.grpc.stub.annotations.RpcMethod(
166       fullMethodName = SERVICE_NAME + '/' + "StreamingInputCall",
167       requestType = io.grpc.testing.integration.Messages.StreamingInputCallRequest.class,
168       responseType = io.grpc.testing.integration.Messages.StreamingInputCallResponse.class,
169       methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
170   public static io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingInputCallRequest,
getStreamingInputCallMethod()171       io.grpc.testing.integration.Messages.StreamingInputCallResponse> getStreamingInputCallMethod() {
172     io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingInputCallRequest, io.grpc.testing.integration.Messages.StreamingInputCallResponse> getStreamingInputCallMethod;
173     if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) {
174       synchronized (TestServiceGrpc.class) {
175         if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) {
176           TestServiceGrpc.getStreamingInputCallMethod = getStreamingInputCallMethod =
177               io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.StreamingInputCallRequest, io.grpc.testing.integration.Messages.StreamingInputCallResponse>newBuilder()
178               .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
179               .setFullMethodName(generateFullMethodName(
180                   "grpc.testing.TestService", "StreamingInputCall"))
181               .setSampledToLocalTracing(true)
182               .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
183                   io.grpc.testing.integration.Messages.StreamingInputCallRequest.getDefaultInstance()))
184               .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
185                   io.grpc.testing.integration.Messages.StreamingInputCallResponse.getDefaultInstance()))
186                   .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("StreamingInputCall"))
187                   .build();
188           }
189         }
190      }
191      return getStreamingInputCallMethod;
192   }
193 
194   private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
195       io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getFullDuplexCallMethod;
196 
197   @io.grpc.stub.annotations.RpcMethod(
198       fullMethodName = SERVICE_NAME + '/' + "FullDuplexCall",
199       requestType = io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class,
200       responseType = io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class,
201       methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
202   public static io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
getFullDuplexCallMethod()203       io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getFullDuplexCallMethod() {
204     io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getFullDuplexCallMethod;
205     if ((getFullDuplexCallMethod = TestServiceGrpc.getFullDuplexCallMethod) == null) {
206       synchronized (TestServiceGrpc.class) {
207         if ((getFullDuplexCallMethod = TestServiceGrpc.getFullDuplexCallMethod) == null) {
208           TestServiceGrpc.getFullDuplexCallMethod = getFullDuplexCallMethod =
209               io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>newBuilder()
210               .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
211               .setFullMethodName(generateFullMethodName(
212                   "grpc.testing.TestService", "FullDuplexCall"))
213               .setSampledToLocalTracing(true)
214               .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
215                   io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance()))
216               .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
217                   io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance()))
218                   .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("FullDuplexCall"))
219                   .build();
220           }
221         }
222      }
223      return getFullDuplexCallMethod;
224   }
225 
226   private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
227       io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getHalfDuplexCallMethod;
228 
229   @io.grpc.stub.annotations.RpcMethod(
230       fullMethodName = SERVICE_NAME + '/' + "HalfDuplexCall",
231       requestType = io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class,
232       responseType = io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class,
233       methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
234   public static io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
getHalfDuplexCallMethod()235       io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getHalfDuplexCallMethod() {
236     io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getHalfDuplexCallMethod;
237     if ((getHalfDuplexCallMethod = TestServiceGrpc.getHalfDuplexCallMethod) == null) {
238       synchronized (TestServiceGrpc.class) {
239         if ((getHalfDuplexCallMethod = TestServiceGrpc.getHalfDuplexCallMethod) == null) {
240           TestServiceGrpc.getHalfDuplexCallMethod = getHalfDuplexCallMethod =
241               io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>newBuilder()
242               .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
243               .setFullMethodName(generateFullMethodName(
244                   "grpc.testing.TestService", "HalfDuplexCall"))
245               .setSampledToLocalTracing(true)
246               .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
247                   io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance()))
248               .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
249                   io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance()))
250                   .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("HalfDuplexCall"))
251                   .build();
252           }
253         }
254      }
255      return getHalfDuplexCallMethod;
256   }
257 
258   private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
259       io.grpc.testing.integration.EmptyProtos.Empty> getUnimplementedCallMethod;
260 
261   @io.grpc.stub.annotations.RpcMethod(
262       fullMethodName = SERVICE_NAME + '/' + "UnimplementedCall",
263       requestType = io.grpc.testing.integration.EmptyProtos.Empty.class,
264       responseType = io.grpc.testing.integration.EmptyProtos.Empty.class,
265       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
266   public static io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
getUnimplementedCallMethod()267       io.grpc.testing.integration.EmptyProtos.Empty> getUnimplementedCallMethod() {
268     io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty> getUnimplementedCallMethod;
269     if ((getUnimplementedCallMethod = TestServiceGrpc.getUnimplementedCallMethod) == null) {
270       synchronized (TestServiceGrpc.class) {
271         if ((getUnimplementedCallMethod = TestServiceGrpc.getUnimplementedCallMethod) == null) {
272           TestServiceGrpc.getUnimplementedCallMethod = getUnimplementedCallMethod =
273               io.grpc.MethodDescriptor.<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty>newBuilder()
274               .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
275               .setFullMethodName(generateFullMethodName(
276                   "grpc.testing.TestService", "UnimplementedCall"))
277               .setSampledToLocalTracing(true)
278               .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
279                   io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
280               .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
281                   io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
282                   .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("UnimplementedCall"))
283                   .build();
284           }
285         }
286      }
287      return getUnimplementedCallMethod;
288   }
289 
290   /**
291    * Creates a new async stub that supports all call types for the service
292    */
newStub(io.grpc.Channel channel)293   public static TestServiceStub newStub(io.grpc.Channel channel) {
294     return new TestServiceStub(channel);
295   }
296 
297   /**
298    * Creates a new blocking-style stub that supports unary and streaming output calls on the service
299    */
newBlockingStub( io.grpc.Channel channel)300   public static TestServiceBlockingStub newBlockingStub(
301       io.grpc.Channel channel) {
302     return new TestServiceBlockingStub(channel);
303   }
304 
305   /**
306    * Creates a new ListenableFuture-style stub that supports unary calls on the service
307    */
newFutureStub( io.grpc.Channel channel)308   public static TestServiceFutureStub newFutureStub(
309       io.grpc.Channel channel) {
310     return new TestServiceFutureStub(channel);
311   }
312 
313   /**
314    * <pre>
315    * A simple service to test the various types of RPCs and experiment with
316    * performance with various types of payload.
317    * </pre>
318    */
319   public static abstract class TestServiceImplBase implements io.grpc.BindableService {
320 
321     /**
322      * <pre>
323      * One empty request followed by one empty response.
324      * </pre>
325      */
emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request, io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver)326     public void emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request,
327         io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
328       asyncUnimplementedUnaryCall(getEmptyCallMethod(), responseObserver);
329     }
330 
331     /**
332      * <pre>
333      * One request followed by one response.
334      * </pre>
335      */
unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver)336     public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
337         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver) {
338       asyncUnimplementedUnaryCall(getUnaryCallMethod(), responseObserver);
339     }
340 
341     /**
342      * <pre>
343      * One request followed by one response. Response has cache control
344      * headers set such that a caching HTTP proxy (such as GFE) can
345      * satisfy subsequent requests.
346      * </pre>
347      */
cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver)348     public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
349         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver) {
350       asyncUnimplementedUnaryCall(getCacheableUnaryCallMethod(), responseObserver);
351     }
352 
353     /**
354      * <pre>
355      * One request followed by a sequence of responses (streamed download).
356      * The server returns the payload with client desired type and sizes.
357      * </pre>
358      */
streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver)359     public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request,
360         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
361       asyncUnimplementedUnaryCall(getStreamingOutputCallMethod(), responseObserver);
362     }
363 
364     /**
365      * <pre>
366      * A sequence of requests followed by one response (streamed upload).
367      * The server returns the aggregated size of client payload as the result.
368      * </pre>
369      */
streamingInputCall( io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallResponse> responseObserver)370     public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallRequest> streamingInputCall(
371         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallResponse> responseObserver) {
372       return asyncUnimplementedStreamingCall(getStreamingInputCallMethod(), responseObserver);
373     }
374 
375     /**
376      * <pre>
377      * A sequence of requests with each request served by the server immediately.
378      * As one request could lead to multiple responses, this interface
379      * demonstrates the idea of full duplexing.
380      * </pre>
381      */
fullDuplexCall( io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver)382     public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> fullDuplexCall(
383         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
384       return asyncUnimplementedStreamingCall(getFullDuplexCallMethod(), responseObserver);
385     }
386 
387     /**
388      * <pre>
389      * A sequence of requests followed by a sequence of responses.
390      * The server buffers all the client requests and then serves them in order. A
391      * stream of responses are returned to the client when the server starts with
392      * first request.
393      * </pre>
394      */
halfDuplexCall( io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver)395     public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> halfDuplexCall(
396         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
397       return asyncUnimplementedStreamingCall(getHalfDuplexCallMethod(), responseObserver);
398     }
399 
400     /**
401      * <pre>
402      * The test server will not implement this method. It will be used
403      * to test the behavior when clients call unimplemented methods.
404      * </pre>
405      */
unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request, io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver)406     public void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request,
407         io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
408       asyncUnimplementedUnaryCall(getUnimplementedCallMethod(), responseObserver);
409     }
410 
bindService()411     @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
412       return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
413           .addMethod(
414             getEmptyCallMethod(),
415             asyncUnaryCall(
416               new MethodHandlers<
417                 io.grpc.testing.integration.EmptyProtos.Empty,
418                 io.grpc.testing.integration.EmptyProtos.Empty>(
419                   this, METHODID_EMPTY_CALL)))
420           .addMethod(
421             getUnaryCallMethod(),
422             asyncUnaryCall(
423               new MethodHandlers<
424                 io.grpc.testing.integration.Messages.SimpleRequest,
425                 io.grpc.testing.integration.Messages.SimpleResponse>(
426                   this, METHODID_UNARY_CALL)))
427           .addMethod(
428             getCacheableUnaryCallMethod(),
429             asyncUnaryCall(
430               new MethodHandlers<
431                 io.grpc.testing.integration.Messages.SimpleRequest,
432                 io.grpc.testing.integration.Messages.SimpleResponse>(
433                   this, METHODID_CACHEABLE_UNARY_CALL)))
434           .addMethod(
435             getStreamingOutputCallMethod(),
436             asyncServerStreamingCall(
437               new MethodHandlers<
438                 io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
439                 io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
440                   this, METHODID_STREAMING_OUTPUT_CALL)))
441           .addMethod(
442             getStreamingInputCallMethod(),
443             asyncClientStreamingCall(
444               new MethodHandlers<
445                 io.grpc.testing.integration.Messages.StreamingInputCallRequest,
446                 io.grpc.testing.integration.Messages.StreamingInputCallResponse>(
447                   this, METHODID_STREAMING_INPUT_CALL)))
448           .addMethod(
449             getFullDuplexCallMethod(),
450             asyncBidiStreamingCall(
451               new MethodHandlers<
452                 io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
453                 io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
454                   this, METHODID_FULL_DUPLEX_CALL)))
455           .addMethod(
456             getHalfDuplexCallMethod(),
457             asyncBidiStreamingCall(
458               new MethodHandlers<
459                 io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
460                 io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
461                   this, METHODID_HALF_DUPLEX_CALL)))
462           .addMethod(
463             getUnimplementedCallMethod(),
464             asyncUnaryCall(
465               new MethodHandlers<
466                 io.grpc.testing.integration.EmptyProtos.Empty,
467                 io.grpc.testing.integration.EmptyProtos.Empty>(
468                   this, METHODID_UNIMPLEMENTED_CALL)))
469           .build();
470     }
471   }
472 
473   /**
474    * <pre>
475    * A simple service to test the various types of RPCs and experiment with
476    * performance with various types of payload.
477    * </pre>
478    */
479   public static final class TestServiceStub extends io.grpc.stub.AbstractStub<TestServiceStub> {
TestServiceStub(io.grpc.Channel channel)480     private TestServiceStub(io.grpc.Channel channel) {
481       super(channel);
482     }
483 
TestServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)484     private TestServiceStub(io.grpc.Channel channel,
485         io.grpc.CallOptions callOptions) {
486       super(channel, callOptions);
487     }
488 
489     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)490     protected TestServiceStub build(io.grpc.Channel channel,
491         io.grpc.CallOptions callOptions) {
492       return new TestServiceStub(channel, callOptions);
493     }
494 
495     /**
496      * <pre>
497      * One empty request followed by one empty response.
498      * </pre>
499      */
emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request, io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver)500     public void emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request,
501         io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
502       asyncUnaryCall(
503           getChannel().newCall(getEmptyCallMethod(), getCallOptions()), request, responseObserver);
504     }
505 
506     /**
507      * <pre>
508      * One request followed by one response.
509      * </pre>
510      */
unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver)511     public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
512         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver) {
513       asyncUnaryCall(
514           getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request, responseObserver);
515     }
516 
517     /**
518      * <pre>
519      * One request followed by one response. Response has cache control
520      * headers set such that a caching HTTP proxy (such as GFE) can
521      * satisfy subsequent requests.
522      * </pre>
523      */
cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver)524     public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
525         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver) {
526       asyncUnaryCall(
527           getChannel().newCall(getCacheableUnaryCallMethod(), getCallOptions()), request, responseObserver);
528     }
529 
530     /**
531      * <pre>
532      * One request followed by a sequence of responses (streamed download).
533      * The server returns the payload with client desired type and sizes.
534      * </pre>
535      */
streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver)536     public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request,
537         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
538       asyncServerStreamingCall(
539           getChannel().newCall(getStreamingOutputCallMethod(), getCallOptions()), request, responseObserver);
540     }
541 
542     /**
543      * <pre>
544      * A sequence of requests followed by one response (streamed upload).
545      * The server returns the aggregated size of client payload as the result.
546      * </pre>
547      */
streamingInputCall( io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallResponse> responseObserver)548     public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallRequest> streamingInputCall(
549         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallResponse> responseObserver) {
550       return asyncClientStreamingCall(
551           getChannel().newCall(getStreamingInputCallMethod(), getCallOptions()), responseObserver);
552     }
553 
554     /**
555      * <pre>
556      * A sequence of requests with each request served by the server immediately.
557      * As one request could lead to multiple responses, this interface
558      * demonstrates the idea of full duplexing.
559      * </pre>
560      */
fullDuplexCall( io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver)561     public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> fullDuplexCall(
562         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
563       return asyncBidiStreamingCall(
564           getChannel().newCall(getFullDuplexCallMethod(), getCallOptions()), responseObserver);
565     }
566 
567     /**
568      * <pre>
569      * A sequence of requests followed by a sequence of responses.
570      * The server buffers all the client requests and then serves them in order. A
571      * stream of responses are returned to the client when the server starts with
572      * first request.
573      * </pre>
574      */
halfDuplexCall( io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver)575     public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> halfDuplexCall(
576         io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
577       return asyncBidiStreamingCall(
578           getChannel().newCall(getHalfDuplexCallMethod(), getCallOptions()), responseObserver);
579     }
580 
581     /**
582      * <pre>
583      * The test server will not implement this method. It will be used
584      * to test the behavior when clients call unimplemented methods.
585      * </pre>
586      */
unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request, io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver)587     public void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request,
588         io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
589       asyncUnaryCall(
590           getChannel().newCall(getUnimplementedCallMethod(), getCallOptions()), request, responseObserver);
591     }
592   }
593 
594   /**
595    * <pre>
596    * A simple service to test the various types of RPCs and experiment with
597    * performance with various types of payload.
598    * </pre>
599    */
600   public static final class TestServiceBlockingStub extends io.grpc.stub.AbstractStub<TestServiceBlockingStub> {
TestServiceBlockingStub(io.grpc.Channel channel)601     private TestServiceBlockingStub(io.grpc.Channel channel) {
602       super(channel);
603     }
604 
TestServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)605     private TestServiceBlockingStub(io.grpc.Channel channel,
606         io.grpc.CallOptions callOptions) {
607       super(channel, callOptions);
608     }
609 
610     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)611     protected TestServiceBlockingStub build(io.grpc.Channel channel,
612         io.grpc.CallOptions callOptions) {
613       return new TestServiceBlockingStub(channel, callOptions);
614     }
615 
616     /**
617      * <pre>
618      * One empty request followed by one empty response.
619      * </pre>
620      */
emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request)621     public io.grpc.testing.integration.EmptyProtos.Empty emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request) {
622       return blockingUnaryCall(
623           getChannel(), getEmptyCallMethod(), getCallOptions(), request);
624     }
625 
626     /**
627      * <pre>
628      * One request followed by one response.
629      * </pre>
630      */
unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request)631     public io.grpc.testing.integration.Messages.SimpleResponse unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request) {
632       return blockingUnaryCall(
633           getChannel(), getUnaryCallMethod(), getCallOptions(), request);
634     }
635 
636     /**
637      * <pre>
638      * One request followed by one response. Response has cache control
639      * headers set such that a caching HTTP proxy (such as GFE) can
640      * satisfy subsequent requests.
641      * </pre>
642      */
cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request)643     public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request) {
644       return blockingUnaryCall(
645           getChannel(), getCacheableUnaryCallMethod(), getCallOptions(), request);
646     }
647 
648     /**
649      * <pre>
650      * One request followed by a sequence of responses (streamed download).
651      * The server returns the payload with client desired type and sizes.
652      * </pre>
653      */
streamingOutputCall( io.grpc.testing.integration.Messages.StreamingOutputCallRequest request)654     public java.util.Iterator<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> streamingOutputCall(
655         io.grpc.testing.integration.Messages.StreamingOutputCallRequest request) {
656       return blockingServerStreamingCall(
657           getChannel(), getStreamingOutputCallMethod(), getCallOptions(), request);
658     }
659 
660     /**
661      * <pre>
662      * The test server will not implement this method. It will be used
663      * to test the behavior when clients call unimplemented methods.
664      * </pre>
665      */
unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request)666     public io.grpc.testing.integration.EmptyProtos.Empty unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request) {
667       return blockingUnaryCall(
668           getChannel(), getUnimplementedCallMethod(), getCallOptions(), request);
669     }
670   }
671 
672   /**
673    * <pre>
674    * A simple service to test the various types of RPCs and experiment with
675    * performance with various types of payload.
676    * </pre>
677    */
678   public static final class TestServiceFutureStub extends io.grpc.stub.AbstractStub<TestServiceFutureStub> {
TestServiceFutureStub(io.grpc.Channel channel)679     private TestServiceFutureStub(io.grpc.Channel channel) {
680       super(channel);
681     }
682 
TestServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)683     private TestServiceFutureStub(io.grpc.Channel channel,
684         io.grpc.CallOptions callOptions) {
685       super(channel, callOptions);
686     }
687 
688     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)689     protected TestServiceFutureStub build(io.grpc.Channel channel,
690         io.grpc.CallOptions callOptions) {
691       return new TestServiceFutureStub(channel, callOptions);
692     }
693 
694     /**
695      * <pre>
696      * One empty request followed by one empty response.
697      * </pre>
698      */
emptyCall( io.grpc.testing.integration.EmptyProtos.Empty request)699     public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.EmptyProtos.Empty> emptyCall(
700         io.grpc.testing.integration.EmptyProtos.Empty request) {
701       return futureUnaryCall(
702           getChannel().newCall(getEmptyCallMethod(), getCallOptions()), request);
703     }
704 
705     /**
706      * <pre>
707      * One request followed by one response.
708      * </pre>
709      */
unaryCall( io.grpc.testing.integration.Messages.SimpleRequest request)710     public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Messages.SimpleResponse> unaryCall(
711         io.grpc.testing.integration.Messages.SimpleRequest request) {
712       return futureUnaryCall(
713           getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request);
714     }
715 
716     /**
717      * <pre>
718      * One request followed by one response. Response has cache control
719      * headers set such that a caching HTTP proxy (such as GFE) can
720      * satisfy subsequent requests.
721      * </pre>
722      */
cacheableUnaryCall( io.grpc.testing.integration.Messages.SimpleRequest request)723     public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Messages.SimpleResponse> cacheableUnaryCall(
724         io.grpc.testing.integration.Messages.SimpleRequest request) {
725       return futureUnaryCall(
726           getChannel().newCall(getCacheableUnaryCallMethod(), getCallOptions()), request);
727     }
728 
729     /**
730      * <pre>
731      * The test server will not implement this method. It will be used
732      * to test the behavior when clients call unimplemented methods.
733      * </pre>
734      */
unimplementedCall( io.grpc.testing.integration.EmptyProtos.Empty request)735     public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.EmptyProtos.Empty> unimplementedCall(
736         io.grpc.testing.integration.EmptyProtos.Empty request) {
737       return futureUnaryCall(
738           getChannel().newCall(getUnimplementedCallMethod(), getCallOptions()), request);
739     }
740   }
741 
742   private static final int METHODID_EMPTY_CALL = 0;
743   private static final int METHODID_UNARY_CALL = 1;
744   private static final int METHODID_CACHEABLE_UNARY_CALL = 2;
745   private static final int METHODID_STREAMING_OUTPUT_CALL = 3;
746   private static final int METHODID_UNIMPLEMENTED_CALL = 4;
747   private static final int METHODID_STREAMING_INPUT_CALL = 5;
748   private static final int METHODID_FULL_DUPLEX_CALL = 6;
749   private static final int METHODID_HALF_DUPLEX_CALL = 7;
750 
751   private static final class MethodHandlers<Req, Resp> implements
752       io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
753       io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
754       io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
755       io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
756     private final TestServiceImplBase serviceImpl;
757     private final int methodId;
758 
MethodHandlers(TestServiceImplBase serviceImpl, int methodId)759     MethodHandlers(TestServiceImplBase serviceImpl, int methodId) {
760       this.serviceImpl = serviceImpl;
761       this.methodId = methodId;
762     }
763 
764     @java.lang.Override
765     @java.lang.SuppressWarnings("unchecked")
invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)766     public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
767       switch (methodId) {
768         case METHODID_EMPTY_CALL:
769           serviceImpl.emptyCall((io.grpc.testing.integration.EmptyProtos.Empty) request,
770               (io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty>) responseObserver);
771           break;
772         case METHODID_UNARY_CALL:
773           serviceImpl.unaryCall((io.grpc.testing.integration.Messages.SimpleRequest) request,
774               (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse>) responseObserver);
775           break;
776         case METHODID_CACHEABLE_UNARY_CALL:
777           serviceImpl.cacheableUnaryCall((io.grpc.testing.integration.Messages.SimpleRequest) request,
778               (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse>) responseObserver);
779           break;
780         case METHODID_STREAMING_OUTPUT_CALL:
781           serviceImpl.streamingOutputCall((io.grpc.testing.integration.Messages.StreamingOutputCallRequest) request,
782               (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>) responseObserver);
783           break;
784         case METHODID_UNIMPLEMENTED_CALL:
785           serviceImpl.unimplementedCall((io.grpc.testing.integration.EmptyProtos.Empty) request,
786               (io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty>) responseObserver);
787           break;
788         default:
789           throw new AssertionError();
790       }
791     }
792 
793     @java.lang.Override
794     @java.lang.SuppressWarnings("unchecked")
invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)795     public io.grpc.stub.StreamObserver<Req> invoke(
796         io.grpc.stub.StreamObserver<Resp> responseObserver) {
797       switch (methodId) {
798         case METHODID_STREAMING_INPUT_CALL:
799           return (io.grpc.stub.StreamObserver<Req>) serviceImpl.streamingInputCall(
800               (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallResponse>) responseObserver);
801         case METHODID_FULL_DUPLEX_CALL:
802           return (io.grpc.stub.StreamObserver<Req>) serviceImpl.fullDuplexCall(
803               (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>) responseObserver);
804         case METHODID_HALF_DUPLEX_CALL:
805           return (io.grpc.stub.StreamObserver<Req>) serviceImpl.halfDuplexCall(
806               (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>) responseObserver);
807         default:
808           throw new AssertionError();
809       }
810     }
811   }
812 
813   private static abstract class TestServiceBaseDescriptorSupplier
814       implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
TestServiceBaseDescriptorSupplier()815     TestServiceBaseDescriptorSupplier() {}
816 
817     @java.lang.Override
getFileDescriptor()818     public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
819       return io.grpc.testing.integration.Test.getDescriptor();
820     }
821 
822     @java.lang.Override
getServiceDescriptor()823     public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
824       return getFileDescriptor().findServiceByName("TestService");
825     }
826   }
827 
828   private static final class TestServiceFileDescriptorSupplier
829       extends TestServiceBaseDescriptorSupplier {
TestServiceFileDescriptorSupplier()830     TestServiceFileDescriptorSupplier() {}
831   }
832 
833   private static final class TestServiceMethodDescriptorSupplier
834       extends TestServiceBaseDescriptorSupplier
835       implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
836     private final String methodName;
837 
TestServiceMethodDescriptorSupplier(String methodName)838     TestServiceMethodDescriptorSupplier(String methodName) {
839       this.methodName = methodName;
840     }
841 
842     @java.lang.Override
getMethodDescriptor()843     public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
844       return getServiceDescriptor().findMethodByName(methodName);
845     }
846   }
847 
848   private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
849 
getServiceDescriptor()850   public static io.grpc.ServiceDescriptor getServiceDescriptor() {
851     io.grpc.ServiceDescriptor result = serviceDescriptor;
852     if (result == null) {
853       synchronized (TestServiceGrpc.class) {
854         result = serviceDescriptor;
855         if (result == null) {
856           serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
857               .setSchemaDescriptor(new TestServiceFileDescriptorSupplier())
858               .addMethod(getEmptyCallMethod())
859               .addMethod(getUnaryCallMethod())
860               .addMethod(getCacheableUnaryCallMethod())
861               .addMethod(getStreamingOutputCallMethod())
862               .addMethod(getStreamingInputCallMethod())
863               .addMethod(getFullDuplexCallMethod())
864               .addMethod(getHalfDuplexCallMethod())
865               .addMethod(getUnimplementedCallMethod())
866               .build();
867         }
868       }
869     }
870     return result;
871   }
872 }
873