Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 1 | package io.grpc.testing.integration; |
| 2 | |
Kun Zhang | 2ee4d02 | 2015-06-04 16:39:25 -0700 | [diff] [blame] | 3 | import static io.grpc.stub.ClientCalls.asyncUnaryCall; |
| 4 | import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; |
| 5 | import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; |
Carl Mastrangelo | 67fc45d | 2015-08-05 13:56:50 -0700 | [diff] [blame] | 6 | import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; |
Kun Zhang | 2ee4d02 | 2015-06-04 16:39:25 -0700 | [diff] [blame] | 7 | import static io.grpc.stub.ClientCalls.blockingUnaryCall; |
| 8 | import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; |
Kun Zhang | 686dcff | 2015-07-16 12:34:37 -0700 | [diff] [blame] | 9 | import static io.grpc.stub.ClientCalls.futureUnaryCall; |
Kun Zhang | 042b278 | 2015-08-17 15:43:40 -0700 | [diff] [blame] | 10 | import static io.grpc.MethodDescriptor.generateFullMethodName; |
Kun Zhang | 867c76d | 2015-07-13 17:15:34 -0700 | [diff] [blame] | 11 | import static io.grpc.stub.ServerCalls.asyncUnaryCall; |
| 12 | import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; |
| 13 | import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; |
Carl Mastrangelo | 67fc45d | 2015-08-05 13:56:50 -0700 | [diff] [blame] | 14 | import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 15 | |
| 16 | import java.io.IOException; |
| 17 | |
| 18 | @javax.annotation.Generated("by gRPC proto compiler") |
| 19 | public class TestServiceGrpc { |
| 20 | |
David P. Baker | 66b984c | 2015-08-21 13:00:26 -0400 | [diff] [blame] | 21 | public static final String SERVICE_NAME = "grpc.testing.TestService"; |
| 22 | |
Kun Zhang | 73acc73 | 2015-06-26 16:32:05 -0700 | [diff] [blame] | 23 | // Static method descriptors that strictly reflect the proto. |
Kun Zhang | 5bb0ea9 | 2015-08-31 09:56:44 -0700 | [diff] [blame] | 24 | @io.grpc.ExperimentalApi |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 25 | public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.SimpleRequest, |
| 26 | io.grpc.testing.integration.nano.Test.SimpleResponse> METHOD_UNARY_CALL = |
Kun Zhang | 73acc73 | 2015-06-26 16:32:05 -0700 | [diff] [blame] | 27 | io.grpc.MethodDescriptor.create( |
| 28 | io.grpc.MethodDescriptor.MethodType.UNARY, |
Kun Zhang | 042b278 | 2015-08-17 15:43:40 -0700 | [diff] [blame] | 29 | generateFullMethodName( |
| 30 | "grpc.testing.TestService", "UnaryCall"), |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 31 | io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.SimpleRequest>marshaller( |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 32 | new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.SimpleRequest>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 33 | @Override |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 34 | public io.grpc.testing.integration.nano.Test.SimpleRequest newInstance() { |
| 35 | return new io.grpc.testing.integration.nano.Test.SimpleRequest(); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 36 | } |
| 37 | }), |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 38 | io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.SimpleResponse>marshaller( |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 39 | new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.SimpleResponse>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 40 | @Override |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 41 | public io.grpc.testing.integration.nano.Test.SimpleResponse newInstance() { |
| 42 | return new io.grpc.testing.integration.nano.Test.SimpleResponse(); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 43 | } |
| 44 | })); |
Kun Zhang | 5bb0ea9 | 2015-08-31 09:56:44 -0700 | [diff] [blame] | 45 | @io.grpc.ExperimentalApi |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 46 | public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, |
| 47 | io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL = |
Kun Zhang | 73acc73 | 2015-06-26 16:32:05 -0700 | [diff] [blame] | 48 | io.grpc.MethodDescriptor.create( |
| 49 | io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING, |
Kun Zhang | 042b278 | 2015-08-17 15:43:40 -0700 | [diff] [blame] | 50 | generateFullMethodName( |
| 51 | "grpc.testing.TestService", "StreamingOutputCall"), |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 52 | io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller( |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 53 | new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 54 | @Override |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 55 | public io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest newInstance() { |
| 56 | return new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest(); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 57 | } |
| 58 | }), |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 59 | io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller( |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 60 | new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 61 | @Override |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 62 | public io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse newInstance() { |
| 63 | return new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse(); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 64 | } |
| 65 | })); |
Kun Zhang | 5bb0ea9 | 2015-08-31 09:56:44 -0700 | [diff] [blame] | 66 | @io.grpc.ExperimentalApi |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 67 | public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest, |
| 68 | io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL = |
Kun Zhang | 73acc73 | 2015-06-26 16:32:05 -0700 | [diff] [blame] | 69 | io.grpc.MethodDescriptor.create( |
| 70 | io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING, |
Kun Zhang | 042b278 | 2015-08-17 15:43:40 -0700 | [diff] [blame] | 71 | generateFullMethodName( |
| 72 | "grpc.testing.TestService", "StreamingInputCall"), |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 73 | io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest>marshaller( |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 74 | new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 75 | @Override |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 76 | public io.grpc.testing.integration.nano.Test.StreamingInputCallRequest newInstance() { |
| 77 | return new io.grpc.testing.integration.nano.Test.StreamingInputCallRequest(); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 78 | } |
| 79 | }), |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 80 | io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>marshaller( |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 81 | new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 82 | @Override |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 83 | public io.grpc.testing.integration.nano.Test.StreamingInputCallResponse newInstance() { |
| 84 | return new io.grpc.testing.integration.nano.Test.StreamingInputCallResponse(); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 85 | } |
| 86 | })); |
Kun Zhang | 5bb0ea9 | 2015-08-31 09:56:44 -0700 | [diff] [blame] | 87 | @io.grpc.ExperimentalApi |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 88 | public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, |
| 89 | io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_FULL_BIDI_CALL = |
Kun Zhang | 73acc73 | 2015-06-26 16:32:05 -0700 | [diff] [blame] | 90 | io.grpc.MethodDescriptor.create( |
Carl Mastrangelo | 67fc45d | 2015-08-05 13:56:50 -0700 | [diff] [blame] | 91 | io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING, |
Kun Zhang | 042b278 | 2015-08-17 15:43:40 -0700 | [diff] [blame] | 92 | generateFullMethodName( |
| 93 | "grpc.testing.TestService", "FullBidiCall"), |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 94 | io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller( |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 95 | new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 96 | @Override |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 97 | public io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest newInstance() { |
| 98 | return new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest(); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 99 | } |
| 100 | }), |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 101 | io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller( |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 102 | new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 103 | @Override |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 104 | public io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse newInstance() { |
| 105 | return new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse(); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 106 | } |
| 107 | })); |
Kun Zhang | 5bb0ea9 | 2015-08-31 09:56:44 -0700 | [diff] [blame] | 108 | @io.grpc.ExperimentalApi |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 109 | public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, |
| 110 | io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_HALF_BIDI_CALL = |
Kun Zhang | 73acc73 | 2015-06-26 16:32:05 -0700 | [diff] [blame] | 111 | io.grpc.MethodDescriptor.create( |
Carl Mastrangelo | 67fc45d | 2015-08-05 13:56:50 -0700 | [diff] [blame] | 112 | io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING, |
Kun Zhang | 042b278 | 2015-08-17 15:43:40 -0700 | [diff] [blame] | 113 | generateFullMethodName( |
| 114 | "grpc.testing.TestService", "HalfBidiCall"), |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 115 | io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller( |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 116 | new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 117 | @Override |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 118 | public io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest newInstance() { |
| 119 | return new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest(); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 120 | } |
| 121 | }), |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 122 | io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller( |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 123 | new io.grpc.protobuf.nano.MessageNanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 124 | @Override |
Eric Anderson | d42559c | 2015-09-03 17:14:29 -0700 | [diff] [blame^] | 125 | public io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse newInstance() { |
| 126 | return new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse(); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 127 | } |
| 128 | })); |
| 129 | |
| 130 | public static TestServiceStub newStub(io.grpc.Channel channel) { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 131 | return new TestServiceStub(channel); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 132 | } |
| 133 | |
| 134 | public static TestServiceBlockingStub newBlockingStub( |
| 135 | io.grpc.Channel channel) { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 136 | return new TestServiceBlockingStub(channel); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | public static TestServiceFutureStub newFutureStub( |
| 140 | io.grpc.Channel channel) { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 141 | return new TestServiceFutureStub(channel); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | public static interface TestService { |
| 145 | |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 146 | public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request, |
| 147 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.SimpleResponse> responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 148 | |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 149 | public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request, |
| 150 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 151 | |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 152 | public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest> streamingInputCall( |
| 153 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 154 | |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 155 | public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> fullBidiCall( |
| 156 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 157 | |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 158 | public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> halfBidiCall( |
| 159 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | public static interface TestServiceBlockingClient { |
| 163 | |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 164 | public io.grpc.testing.integration.nano.Test.SimpleResponse unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 165 | |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 166 | public java.util.Iterator<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> streamingOutputCall( |
| 167 | io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | public static interface TestServiceFutureClient { |
| 171 | |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 172 | public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.nano.Test.SimpleResponse> unaryCall( |
| 173 | io.grpc.testing.integration.nano.Test.SimpleRequest request); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 174 | } |
| 175 | |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 176 | public static class TestServiceStub extends io.grpc.stub.AbstractStub<TestServiceStub> |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 177 | implements TestService { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 178 | private TestServiceStub(io.grpc.Channel channel) { |
| 179 | super(channel); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 180 | } |
| 181 | |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 182 | private TestServiceStub(io.grpc.Channel channel, |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 183 | io.grpc.CallOptions callOptions) { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 184 | super(channel, callOptions); |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 185 | } |
| 186 | |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 187 | @java.lang.Override |
| 188 | protected TestServiceStub build(io.grpc.Channel channel, |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 189 | io.grpc.CallOptions callOptions) { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 190 | return new TestServiceStub(channel, callOptions); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 191 | } |
| 192 | |
| 193 | @java.lang.Override |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 194 | public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request, |
| 195 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.SimpleResponse> responseObserver) { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 196 | asyncUnaryCall( |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 197 | channel.newCall(METHOD_UNARY_CALL, callOptions), request, responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 198 | } |
| 199 | |
| 200 | @java.lang.Override |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 201 | public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request, |
| 202 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 203 | asyncServerStreamingCall( |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 204 | channel.newCall(METHOD_STREAMING_OUTPUT_CALL, callOptions), request, responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 205 | } |
| 206 | |
| 207 | @java.lang.Override |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 208 | public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest> streamingInputCall( |
| 209 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> responseObserver) { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 210 | return asyncClientStreamingCall( |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 211 | channel.newCall(METHOD_STREAMING_INPUT_CALL, callOptions), responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 212 | } |
| 213 | |
| 214 | @java.lang.Override |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 215 | public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> fullBidiCall( |
| 216 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) { |
Carl Mastrangelo | 67fc45d | 2015-08-05 13:56:50 -0700 | [diff] [blame] | 217 | return asyncBidiStreamingCall( |
| 218 | channel.newCall(METHOD_FULL_BIDI_CALL, callOptions), responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 219 | } |
| 220 | |
| 221 | @java.lang.Override |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 222 | public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> halfBidiCall( |
| 223 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) { |
Carl Mastrangelo | 67fc45d | 2015-08-05 13:56:50 -0700 | [diff] [blame] | 224 | return asyncBidiStreamingCall( |
| 225 | channel.newCall(METHOD_HALF_BIDI_CALL, callOptions), responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 226 | } |
| 227 | } |
| 228 | |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 229 | public static class TestServiceBlockingStub extends io.grpc.stub.AbstractStub<TestServiceBlockingStub> |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 230 | implements TestServiceBlockingClient { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 231 | private TestServiceBlockingStub(io.grpc.Channel channel) { |
| 232 | super(channel); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 233 | } |
| 234 | |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 235 | private TestServiceBlockingStub(io.grpc.Channel channel, |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 236 | io.grpc.CallOptions callOptions) { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 237 | super(channel, callOptions); |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 238 | } |
| 239 | |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 240 | @java.lang.Override |
| 241 | protected TestServiceBlockingStub build(io.grpc.Channel channel, |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 242 | io.grpc.CallOptions callOptions) { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 243 | return new TestServiceBlockingStub(channel, callOptions); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 244 | } |
| 245 | |
| 246 | @java.lang.Override |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 247 | public io.grpc.testing.integration.nano.Test.SimpleResponse unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request) { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 248 | return blockingUnaryCall( |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 249 | channel.newCall(METHOD_UNARY_CALL, callOptions), request); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 250 | } |
| 251 | |
| 252 | @java.lang.Override |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 253 | public java.util.Iterator<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> streamingOutputCall( |
| 254 | io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request) { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 255 | return blockingServerStreamingCall( |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 256 | channel.newCall(METHOD_STREAMING_OUTPUT_CALL, callOptions), request); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 257 | } |
| 258 | } |
| 259 | |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 260 | public static class TestServiceFutureStub extends io.grpc.stub.AbstractStub<TestServiceFutureStub> |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 261 | implements TestServiceFutureClient { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 262 | private TestServiceFutureStub(io.grpc.Channel channel) { |
| 263 | super(channel); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 264 | } |
| 265 | |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 266 | private TestServiceFutureStub(io.grpc.Channel channel, |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 267 | io.grpc.CallOptions callOptions) { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 268 | super(channel, callOptions); |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 269 | } |
| 270 | |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 271 | @java.lang.Override |
| 272 | protected TestServiceFutureStub build(io.grpc.Channel channel, |
Kun Zhang | d3c5b00 | 2015-06-25 20:24:01 -0700 | [diff] [blame] | 273 | io.grpc.CallOptions callOptions) { |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 274 | return new TestServiceFutureStub(channel, callOptions); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 275 | } |
| 276 | |
| 277 | @java.lang.Override |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 278 | public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.nano.Test.SimpleResponse> unaryCall( |
| 279 | io.grpc.testing.integration.nano.Test.SimpleRequest request) { |
Kun Zhang | 686dcff | 2015-07-16 12:34:37 -0700 | [diff] [blame] | 280 | return futureUnaryCall( |
Kun Zhang | eb92967 | 2015-07-17 17:02:58 -0700 | [diff] [blame] | 281 | channel.newCall(METHOD_UNARY_CALL, callOptions), request); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 282 | } |
| 283 | } |
| 284 | |
| 285 | public static io.grpc.ServerServiceDefinition bindService( |
| 286 | final TestService serviceImpl) { |
David P. Baker | 66b984c | 2015-08-21 13:00:26 -0400 | [diff] [blame] | 287 | return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME) |
Kun Zhang | 73acc73 | 2015-06-26 16:32:05 -0700 | [diff] [blame] | 288 | .addMethod(io.grpc.ServerMethodDefinition.create( |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 289 | METHOD_UNARY_CALL, |
Kun Zhang | 867c76d | 2015-07-13 17:15:34 -0700 | [diff] [blame] | 290 | asyncUnaryCall( |
| 291 | new io.grpc.stub.ServerCalls.UnaryMethod< |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 292 | io.grpc.testing.integration.nano.Test.SimpleRequest, |
| 293 | io.grpc.testing.integration.nano.Test.SimpleResponse>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 294 | @java.lang.Override |
| 295 | public void invoke( |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 296 | io.grpc.testing.integration.nano.Test.SimpleRequest request, |
| 297 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.SimpleResponse> responseObserver) { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 298 | serviceImpl.unaryCall(request, responseObserver); |
| 299 | } |
| 300 | }))) |
Kun Zhang | 73acc73 | 2015-06-26 16:32:05 -0700 | [diff] [blame] | 301 | .addMethod(io.grpc.ServerMethodDefinition.create( |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 302 | METHOD_STREAMING_OUTPUT_CALL, |
Kun Zhang | 867c76d | 2015-07-13 17:15:34 -0700 | [diff] [blame] | 303 | asyncServerStreamingCall( |
| 304 | new io.grpc.stub.ServerCalls.ServerStreamingMethod< |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 305 | io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, |
| 306 | io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 307 | @java.lang.Override |
| 308 | public void invoke( |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 309 | io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request, |
| 310 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 311 | serviceImpl.streamingOutputCall(request, responseObserver); |
| 312 | } |
| 313 | }))) |
Kun Zhang | 73acc73 | 2015-06-26 16:32:05 -0700 | [diff] [blame] | 314 | .addMethod(io.grpc.ServerMethodDefinition.create( |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 315 | METHOD_STREAMING_INPUT_CALL, |
Kun Zhang | 867c76d | 2015-07-13 17:15:34 -0700 | [diff] [blame] | 316 | asyncClientStreamingCall( |
| 317 | new io.grpc.stub.ServerCalls.ClientStreamingMethod< |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 318 | io.grpc.testing.integration.nano.Test.StreamingInputCallRequest, |
| 319 | io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 320 | @java.lang.Override |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 321 | public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest> invoke( |
| 322 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> responseObserver) { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 323 | return serviceImpl.streamingInputCall(responseObserver); |
| 324 | } |
| 325 | }))) |
Kun Zhang | 73acc73 | 2015-06-26 16:32:05 -0700 | [diff] [blame] | 326 | .addMethod(io.grpc.ServerMethodDefinition.create( |
Carl Mastrangelo | 67fc45d | 2015-08-05 13:56:50 -0700 | [diff] [blame] | 327 | METHOD_FULL_BIDI_CALL, |
| 328 | asyncBidiStreamingCall( |
| 329 | new io.grpc.stub.ServerCalls.BidiStreamingMethod< |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 330 | io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, |
| 331 | io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 332 | @java.lang.Override |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 333 | public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> invoke( |
| 334 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) { |
Carl Mastrangelo | 67fc45d | 2015-08-05 13:56:50 -0700 | [diff] [blame] | 335 | return serviceImpl.fullBidiCall(responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 336 | } |
| 337 | }))) |
Kun Zhang | 73acc73 | 2015-06-26 16:32:05 -0700 | [diff] [blame] | 338 | .addMethod(io.grpc.ServerMethodDefinition.create( |
Carl Mastrangelo | 67fc45d | 2015-08-05 13:56:50 -0700 | [diff] [blame] | 339 | METHOD_HALF_BIDI_CALL, |
| 340 | asyncBidiStreamingCall( |
| 341 | new io.grpc.stub.ServerCalls.BidiStreamingMethod< |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 342 | io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, |
| 343 | io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>() { |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 344 | @java.lang.Override |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 345 | public io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest> invoke( |
| 346 | io.grpc.stub.StreamObserver<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> responseObserver) { |
Carl Mastrangelo | 67fc45d | 2015-08-05 13:56:50 -0700 | [diff] [blame] | 347 | return serviceImpl.halfBidiCall(responseObserver); |
Xiao Hang | dcff315 | 2015-02-20 15:03:06 -0800 | [diff] [blame] | 348 | } |
| 349 | }))).build(); |
| 350 | } |
| 351 | } |