diff --git a/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/BenchmarkServiceGrpc.java b/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/BenchmarkServiceGrpc.java index 8883137416..67c764ee13 100644 --- a/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/BenchmarkServiceGrpc.java +++ b/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/BenchmarkServiceGrpc.java @@ -15,6 +15,8 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +/** + */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: services.proto") @@ -44,25 +46,48 @@ public class BenchmarkServiceGrpc { io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.benchmarks.proto.Messages.SimpleRequest.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.benchmarks.proto.Messages.SimpleResponse.getDefaultInstance())); + /** + * Creates a new async stub that supports all call types for the service + */ public static BenchmarkServiceStub newStub(io.grpc.Channel channel) { return new BenchmarkServiceStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static BenchmarkServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { return new BenchmarkServiceBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static BenchmarkServiceFutureStub newFutureStub( io.grpc.Channel channel) { return new BenchmarkServiceFutureStub(channel); } + /** + */ public static interface BenchmarkService { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public void unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public io.grpc.stub.StreamObserver streamingCall( io.grpc.stub.StreamObserver responseObserver); } @@ -87,13 +112,29 @@ public class BenchmarkServiceGrpc { } } + /** + */ public static interface BenchmarkServiceBlockingClient { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public io.grpc.benchmarks.proto.Messages.SimpleResponse unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request); } + /** + */ public static interface BenchmarkServiceFutureClient { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture unaryCall( io.grpc.benchmarks.proto.Messages.SimpleRequest request); } diff --git a/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/WorkerServiceGrpc.java b/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/WorkerServiceGrpc.java index 52d0193c8d..12a4af67cb 100644 --- a/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/WorkerServiceGrpc.java +++ b/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/WorkerServiceGrpc.java @@ -15,6 +15,8 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +/** + */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: services.proto") @@ -62,31 +64,72 @@ public class WorkerServiceGrpc { io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.benchmarks.proto.Control.Void.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.benchmarks.proto.Control.Void.getDefaultInstance())); + /** + * Creates a new async stub that supports all call types for the service + */ public static WorkerServiceStub newStub(io.grpc.Channel channel) { return new WorkerServiceStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static WorkerServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { return new WorkerServiceBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static WorkerServiceFutureStub newFutureStub( io.grpc.Channel channel) { return new WorkerServiceFutureStub(channel); } + /** + */ public static interface WorkerService { + /** + *
+     * Start server with specified workload.
+     * First request sent specifies the ServerConfig followed by ServerStatus
+     * response. After that, a "Mark" can be sent anytime to request the latest
+     * stats. Closing the stream will initiate shutdown of the test server
+     * and once the shutdown has finished, the OK status is sent to terminate
+     * this RPC.
+     * 
+ */ public io.grpc.stub.StreamObserver runServer( io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * Start client with specified workload.
+     * First request sent specifies the ClientConfig followed by ClientStatus
+     * response. After that, a "Mark" can be sent anytime to request the latest
+     * stats. Closing the stream will initiate shutdown of the test client
+     * and once the shutdown has finished, the OK status is sent to terminate
+     * this RPC.
+     * 
+ */ public io.grpc.stub.StreamObserver runClient( io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * Just return the core count - unary call
+     * 
+ */ public void coreCount(io.grpc.benchmarks.proto.Control.CoreRequest request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * Quit this worker
+     * 
+ */ public void quitWorker(io.grpc.benchmarks.proto.Control.Void request, io.grpc.stub.StreamObserver responseObserver); } @@ -123,18 +166,42 @@ public class WorkerServiceGrpc { } } + /** + */ public static interface WorkerServiceBlockingClient { + /** + *
+     * Just return the core count - unary call
+     * 
+ */ public io.grpc.benchmarks.proto.Control.CoreResponse coreCount(io.grpc.benchmarks.proto.Control.CoreRequest request); + /** + *
+     * Quit this worker
+     * 
+ */ public io.grpc.benchmarks.proto.Control.Void quitWorker(io.grpc.benchmarks.proto.Control.Void request); } + /** + */ public static interface WorkerServiceFutureClient { + /** + *
+     * Just return the core count - unary call
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture coreCount( io.grpc.benchmarks.proto.Control.CoreRequest request); + /** + *
+     * Quit this worker
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture quitWorker( io.grpc.benchmarks.proto.Control.Void request); } diff --git a/compiler/src/java_plugin/cpp/java_generator.cpp b/compiler/src/java_plugin/cpp/java_generator.cpp index 8a65b06b54..0c4d05b3e6 100644 --- a/compiler/src/java_plugin/cpp/java_generator.cpp +++ b/compiler/src/java_plugin/cpp/java_generator.cpp @@ -25,6 +25,7 @@ using google::protobuf::ServiceDescriptor; using google::protobuf::MethodDescriptor; using google::protobuf::Descriptor; using google::protobuf::io::Printer; +using google::protobuf::SourceLocation; using std::to_string; // Adjust a method name prefix identifier to follow the JavaBean spec: @@ -90,6 +91,208 @@ static inline string MessageFullJavaName(bool nano, const Descriptor* desc) { return name; } +// TODO(nmittler): Remove once protobuf includes javadoc methods in distribution. +template +static void GrpcSplitStringToIteratorUsing(const string& full, + const char* delim, + ITR& result) { + // Optimize the common case where delim is a single character. + if (delim[0] != '\0' && delim[1] == '\0') { + char c = delim[0]; + const char* p = full.data(); + const char* end = p + full.size(); + while (p != end) { + if (*p == c) { + ++p; + } else { + const char* start = p; + while (++p != end && *p != c); + *result++ = string(start, p - start); + } + } + return; + } + + string::size_type begin_index, end_index; + begin_index = full.find_first_not_of(delim); + while (begin_index != string::npos) { + end_index = full.find_first_of(delim, begin_index); + if (end_index == string::npos) { + *result++ = full.substr(begin_index); + return; + } + *result++ = full.substr(begin_index, (end_index - begin_index)); + begin_index = full.find_first_not_of(delim, end_index); + } +} + +// TODO(nmittler): Remove once protobuf includes javadoc methods in distribution. +static void GrpcSplitStringUsing(const string& full, + const char* delim, + vector* result) { + back_insert_iterator< vector > it(*result); + GrpcSplitStringToIteratorUsing(full, delim, it); +} + +// TODO(nmittler): Remove once protobuf includes javadoc methods in distribution. +static vector GrpcSplit(const string& full, const char* delim) { + vector result; + GrpcSplitStringUsing(full, delim, &result); + return result; +} + +// TODO(nmittler): Remove once protobuf includes javadoc methods in distribution. +static string GrpcEscapeJavadoc(const string& input) { + string result; + result.reserve(input.size() * 2); + + char prev = '*'; + + for (string::size_type i = 0; i < input.size(); i++) { + char c = input[i]; + switch (c) { + case '*': + // Avoid "/*". + if (prev == '/') { + result.append("*"); + } else { + result.push_back(c); + } + break; + case '/': + // Avoid "*/". + if (prev == '*') { + result.append("/"); + } else { + result.push_back(c); + } + break; + case '@': + // '@' starts javadoc tags including the @deprecated tag, which will + // cause a compile-time error if inserted before a declaration that + // does not have a corresponding @Deprecated annotation. + result.append("@"); + break; + case '<': + // Avoid interpretation as HTML. + result.append("<"); + break; + case '>': + // Avoid interpretation as HTML. + result.append(">"); + break; + case '&': + // Avoid interpretation as HTML. + result.append("&"); + break; + case '\\': + // Java interprets Unicode escape sequences anywhere! + result.append("\"); + break; + default: + result.push_back(c); + break; + } + + prev = c; + } + + return result; +} + +// TODO(nmittler): Remove once protobuf includes javadoc methods in distribution. +template +static string GrpcGetCommentsForDescriptor(const DescriptorType* descriptor) { + SourceLocation location; + if (descriptor->GetSourceLocation(&location)) { + return location.leading_comments.empty() ? + location.trailing_comments : location.leading_comments; + } + return string(); +} + +// TODO(nmittler): Remove once protobuf includes javadoc methods in distribution. +static vector GrpcGetDocLines(const string& comments) { + if (!comments.empty()) { + // TODO(kenton): Ideally we should parse the comment text as Markdown and + // write it back as HTML, but this requires a Markdown parser. For now + // we just use
 to get fixed-width text formatting.
+
+    // If the comment itself contains block comment start or end markers,
+    // HTML-escape them so that they don't accidentally close the doc comment.
+    string escapedComments = GrpcEscapeJavadoc(comments);
+
+    vector lines = GrpcSplit(escapedComments, "\n");
+    while (!lines.empty() && lines.back().empty()) {
+      lines.pop_back();
+    }
+    return lines;
+  }
+  return vector();
+}
+
+// TODO(nmittler): Remove once protobuf includes javadoc methods in distribution.
+template 
+static vector GrpcGetDocLinesForDescriptor(const DescriptorType* descriptor) {
+  return GrpcGetDocLines(GrpcGetCommentsForDescriptor(descriptor));
+}
+
+// TODO(nmittler): Remove once protobuf includes javadoc methods in distribution.
+static void GrpcWriteDocCommentBody(Printer* printer,
+                                    const vector& lines,
+                                    bool surroundWithPreTag) {
+  if (!lines.empty()) {
+    if (surroundWithPreTag) {
+      printer->Print(" * 
\n");
+    }
+
+    for (int i = 0; i < lines.size(); i++) {
+      // Most lines should start with a space.  Watch out for lines that start
+      // with a /, since putting that right after the leading asterisk will
+      // close the comment.
+      if (!lines[i].empty() && lines[i][0] == '/') {
+        printer->Print(" * $line$\n", "line", lines[i]);
+      } else {
+        printer->Print(" *$line$\n", "line", lines[i]);
+      }
+    }
+
+    if (surroundWithPreTag) {
+      printer->Print(" * 
\n"); + } + } +} + +// TODO(nmittler): Remove once protobuf includes javadoc methods in distribution. +static void GrpcWriteDocComment(Printer* printer, const string& comments) { + printer->Print("/**\n"); + vector lines = GrpcGetDocLines(comments); + GrpcWriteDocCommentBody(printer, lines, false); + printer->Print(" */\n"); +} + +// TODO(nmittler): Remove once protobuf includes javadoc methods in distribution. +static void GrpcWriteServiceDocComment(Printer* printer, + const ServiceDescriptor* service) { + // Deviating from protobuf to avoid extraneous docs + // (see https://github.com/google/protobuf/issues/1406); + printer->Print("/**\n"); + vector lines = GrpcGetDocLinesForDescriptor(service); + GrpcWriteDocCommentBody(printer, lines, true); + printer->Print(" */\n"); +} + +// TODO(nmittler): Remove once protobuf includes javadoc methods in distribution. +void GrpcWriteMethodDocComment(Printer* printer, + const MethodDescriptor* method) { + // Deviating from protobuf to avoid extraneous docs + // (see https://github.com/google/protobuf/issues/1406); + printer->Print("/**\n"); + vector lines = GrpcGetDocLinesForDescriptor(method); + GrpcWriteDocCommentBody(printer, lines, true); + printer->Print(" */\n"); +} + static void PrintMethodFields( const ServiceDescriptor* service, map* vars, Printer* p, ProtoFlavor flavor) { @@ -293,6 +496,7 @@ static void PrintStub( (*vars)["interface_name"] = interface_name; (*vars)["impl_name"] = impl_name; + bool interface = !abstract && !impl; // Class head if (abstract) { p->Print( @@ -300,7 +504,10 @@ static void PrintStub( "@$ExperimentalApi$\n" "public static abstract class $abstract_name$ implements $service_name$, " "$BindableService$ {\n"); - } else if (!impl) { + } else if (interface) { + // TODO(nmittler): Replace with WriteServiceDocComment when included in protobuf distribution. + // Print the service-level javadoc when we define the interface. + GrpcWriteServiceDocComment(p, service); p->Print( *vars, "public static interface $interface_name$ {\n"); @@ -366,7 +573,10 @@ static void PrintStub( // Method signature p->Print("\n"); - if (impl || abstract) { + if (interface) { + // TODO(nmittler): Replace with WriteMethodDocComment once included by the protobuf distro. + GrpcWriteMethodDocComment(p, method); + } else { p->Print( *vars, "@$Override$\n"); @@ -715,6 +925,8 @@ static void PrintService(const ServiceDescriptor* service, #else (*vars)["grpc_version"] = ""; #endif + // TODO(nmittler): Replace with WriteServiceDocComment once included by protobuf distro. + GrpcWriteServiceDocComment(p, service); p->Print( *vars, "@$Generated$(\n" @@ -733,6 +945,8 @@ static void PrintService(const ServiceDescriptor* service, PrintMethodFields(service, vars, p, flavor); + // TODO(nmittler): Replace with WriteDocComment once included by protobuf distro. + GrpcWriteDocComment(p, " Creates a new async stub that supports all call types for the service"); p->Print( *vars, "public static $service_name$Stub newStub($Channel$ channel) {\n"); @@ -742,6 +956,10 @@ static void PrintService(const ServiceDescriptor* service, "return new $service_name$Stub(channel);\n"); p->Outdent(); p->Print("}\n\n"); + + // TODO(nmittler): Replace with WriteDocComment once included by protobuf distro. + GrpcWriteDocComment(p, " Creates a new blocking-style stub that supports unary and streaming " + "output calls on the service"); p->Print( *vars, "public static $service_name$BlockingStub newBlockingStub(\n" @@ -752,6 +970,10 @@ static void PrintService(const ServiceDescriptor* service, "return new $service_name$BlockingStub(channel);\n"); p->Outdent(); p->Print("}\n\n"); + + // TODO(nmittler): Replace with WriteDocComment once included by protobuf distro. + GrpcWriteDocComment(p, " Creates a new ListenableFuture-style stub that supports unary and " + "streaming output calls on the service"); p->Print( *vars, "public static $service_name$FutureStub newFutureStub(\n" diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt index 57691bf84a..535313a2b6 100644 --- a/compiler/src/test/golden/TestService.java.txt +++ b/compiler/src/test/golden/TestService.java.txt @@ -15,6 +15,11 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +/** + *
+ * Test service that supports all call types.
+ * 
+ */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: test.proto") @@ -71,34 +76,81 @@ public class TestServiceGrpc { io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.getDefaultInstance())); + /** + * Creates a new async stub that supports all call types for the service + */ public static TestServiceStub newStub(io.grpc.Channel channel) { return new TestServiceStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static TestServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { return new TestServiceBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static TestServiceFutureStub newFutureStub( io.grpc.Channel channel) { return new TestServiceFutureStub(channel); } + /** + *
+   * Test service that supports all call types.
+   * 
+ */ public static interface TestService { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * One request followed by a sequence of responses (streamed download).
+     * The server returns the payload with client desired type and sizes.
+     * 
+ */ public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests followed by one response (streamed upload).
+     * The server returns the aggregated size of client payload as the result.
+     * 
+ */ public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests with each request served by the server immediately.
+     * As one request could lead to multiple responses, this interface
+     * demonstrates the idea of full bidirectionality.
+     * 
+ */ public io.grpc.stub.StreamObserver fullBidiCall( io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests followed by a sequence of responses.
+     * The server buffers all the client requests and then serves them in order. A
+     * stream of responses are returned to the client when the server starts with
+     * first request.
+     * 
+ */ public io.grpc.stub.StreamObserver halfBidiCall( io.grpc.stub.StreamObserver responseObserver); } @@ -141,16 +193,44 @@ public class TestServiceGrpc { } } + /** + *
+   * Test service that supports all call types.
+   * 
+ */ public static interface TestServiceBlockingClient { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request); + /** + *
+     * One request followed by a sequence of responses (streamed download).
+     * The server returns the payload with client desired type and sizes.
+     * 
+ */ public java.util.Iterator streamingOutputCall( io.grpc.testing.integration.Test.StreamingOutputCallRequest request); } + /** + *
+   * Test service that supports all call types.
+   * 
+ */ public static interface TestServiceFutureClient { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture unaryCall( io.grpc.testing.integration.Test.SimpleRequest request); } diff --git a/compiler/src/test/proto/test.proto b/compiler/src/test/proto/test.proto index 5b4a267685..dfaaed571c 100644 --- a/compiler/src/test/proto/test.proto +++ b/compiler/src/test/proto/test.proto @@ -23,6 +23,7 @@ message StreamingOutputCallRequest { message StreamingOutputCallResponse { } +// Test service that supports all call types. service TestService { // One request followed by one response. // The server returns the client payload as-is. diff --git a/compiler/src/testLite/golden/TestService.java.txt b/compiler/src/testLite/golden/TestService.java.txt index 31002c94d9..90343fd9aa 100644 --- a/compiler/src/testLite/golden/TestService.java.txt +++ b/compiler/src/testLite/golden/TestService.java.txt @@ -15,6 +15,11 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +/** + *
+ * Test service that supports all call types.
+ * 
+ */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: test.proto") @@ -71,34 +76,81 @@ public class TestServiceGrpc { io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance()), io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.getDefaultInstance())); + /** + * Creates a new async stub that supports all call types for the service + */ public static TestServiceStub newStub(io.grpc.Channel channel) { return new TestServiceStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static TestServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { return new TestServiceBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static TestServiceFutureStub newFutureStub( io.grpc.Channel channel) { return new TestServiceFutureStub(channel); } + /** + *
+   * Test service that supports all call types.
+   * 
+ */ public static interface TestService { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * One request followed by a sequence of responses (streamed download).
+     * The server returns the payload with client desired type and sizes.
+     * 
+ */ public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests followed by one response (streamed upload).
+     * The server returns the aggregated size of client payload as the result.
+     * 
+ */ public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests with each request served by the server immediately.
+     * As one request could lead to multiple responses, this interface
+     * demonstrates the idea of full bidirectionality.
+     * 
+ */ public io.grpc.stub.StreamObserver fullBidiCall( io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests followed by a sequence of responses.
+     * The server buffers all the client requests and then serves them in order. A
+     * stream of responses are returned to the client when the server starts with
+     * first request.
+     * 
+ */ public io.grpc.stub.StreamObserver halfBidiCall( io.grpc.stub.StreamObserver responseObserver); } @@ -141,16 +193,44 @@ public class TestServiceGrpc { } } + /** + *
+   * Test service that supports all call types.
+   * 
+ */ public static interface TestServiceBlockingClient { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request); + /** + *
+     * One request followed by a sequence of responses (streamed download).
+     * The server returns the payload with client desired type and sizes.
+     * 
+ */ public java.util.Iterator streamingOutputCall( io.grpc.testing.integration.Test.StreamingOutputCallRequest request); } + /** + *
+   * Test service that supports all call types.
+   * 
+ */ public static interface TestServiceFutureClient { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture unaryCall( io.grpc.testing.integration.Test.SimpleRequest request); } diff --git a/compiler/src/testLite/proto/test.proto b/compiler/src/testLite/proto/test.proto index fb2e3e7722..d2a1fd5879 100644 --- a/compiler/src/testLite/proto/test.proto +++ b/compiler/src/testLite/proto/test.proto @@ -24,6 +24,7 @@ message StreamingOutputCallRequest { message StreamingOutputCallResponse { } +// Test service that supports all call types. service TestService { // One request followed by one response. // The server returns the client payload as-is. diff --git a/compiler/src/testNano/golden/TestService.java.txt b/compiler/src/testNano/golden/TestService.java.txt index 1f2c91c361..f0232ecce0 100644 --- a/compiler/src/testNano/golden/TestService.java.txt +++ b/compiler/src/testNano/golden/TestService.java.txt @@ -17,6 +17,11 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; import java.io.IOException; +/** + *
+ * Test service that supports all call types.
+ * 
+ */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: test.proto") @@ -149,34 +154,81 @@ public class TestServiceGrpc { } } + /** + * Creates a new async stub that supports all call types for the service + */ public static TestServiceStub newStub(io.grpc.Channel channel) { return new TestServiceStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static TestServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { return new TestServiceBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static TestServiceFutureStub newFutureStub( io.grpc.Channel channel) { return new TestServiceFutureStub(channel); } + /** + *
+   * Test service that supports all call types.
+   * 
+ */ public static interface TestService { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * One request followed by a sequence of responses (streamed download).
+     * The server returns the payload with client desired type and sizes.
+     * 
+ */ public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests followed by one response (streamed upload).
+     * The server returns the aggregated size of client payload as the result.
+     * 
+ */ public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests with each request served by the server immediately.
+     * As one request could lead to multiple responses, this interface
+     * demonstrates the idea of full bidirectionality.
+     * 
+ */ public io.grpc.stub.StreamObserver fullBidiCall( io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests followed by a sequence of responses.
+     * The server buffers all the client requests and then serves them in order. A
+     * stream of responses are returned to the client when the server starts with
+     * first request.
+     * 
+ */ public io.grpc.stub.StreamObserver halfBidiCall( io.grpc.stub.StreamObserver responseObserver); } @@ -219,16 +271,44 @@ public class TestServiceGrpc { } } + /** + *
+   * Test service that supports all call types.
+   * 
+ */ public static interface TestServiceBlockingClient { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public io.grpc.testing.integration.nano.Test.SimpleResponse unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request); + /** + *
+     * One request followed by a sequence of responses (streamed download).
+     * The server returns the payload with client desired type and sizes.
+     * 
+ */ public java.util.Iterator streamingOutputCall( io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request); } + /** + *
+   * Test service that supports all call types.
+   * 
+ */ public static interface TestServiceFutureClient { + /** + *
+     * One request followed by one response.
+     * The server returns the client payload as-is.
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture unaryCall( io.grpc.testing.integration.nano.Test.SimpleRequest request); } diff --git a/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java b/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java index d6f69dd95b..b72f51a4a4 100644 --- a/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java +++ b/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java @@ -15,6 +15,11 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +/** + *
+ * The greeting service definition.
+ * 
+ */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: helloworld.proto") @@ -35,22 +40,41 @@ public class GreeterGrpc { io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloRequest.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloReply.getDefaultInstance())); + /** + * Creates a new async stub that supports all call types for the service + */ public static GreeterStub newStub(io.grpc.Channel channel) { return new GreeterStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static GreeterBlockingStub newBlockingStub( io.grpc.Channel channel) { return new GreeterBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static GreeterFutureStub newFutureStub( io.grpc.Channel channel) { return new GreeterFutureStub(channel); } + /** + *
+   * The greeting service definition.
+   * 
+ */ public static interface Greeter { + /** + *
+     * Sends a greeting
+     * 
+ */ public void sayHello(io.grpc.examples.helloworld.HelloRequest request, io.grpc.stub.StreamObserver responseObserver); } @@ -69,13 +93,33 @@ public class GreeterGrpc { } } + /** + *
+   * The greeting service definition.
+   * 
+ */ public static interface GreeterBlockingClient { + /** + *
+     * Sends a greeting
+     * 
+ */ public io.grpc.examples.helloworld.HelloReply sayHello(io.grpc.examples.helloworld.HelloRequest request); } + /** + *
+   * The greeting service definition.
+   * 
+ */ public static interface GreeterFutureClient { + /** + *
+     * Sends a greeting
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture sayHello( io.grpc.examples.helloworld.HelloRequest request); } diff --git a/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java b/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java index d7dcdac4a6..16b4e11acc 100644 --- a/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java +++ b/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java @@ -15,6 +15,11 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +/** + *
+ * Interface exported by the server.
+ * 
+ */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: route_guide.proto") @@ -62,31 +67,76 @@ public class RouteGuideGrpc { io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.getDefaultInstance())); + /** + * Creates a new async stub that supports all call types for the service + */ public static RouteGuideStub newStub(io.grpc.Channel channel) { return new RouteGuideStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static RouteGuideBlockingStub newBlockingStub( io.grpc.Channel channel) { return new RouteGuideBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static RouteGuideFutureStub newFutureStub( io.grpc.Channel channel) { return new RouteGuideFutureStub(channel); } + /** + *
+   * Interface exported by the server.
+   * 
+ */ public static interface RouteGuide { + /** + *
+     * A simple RPC.
+     * Obtains the feature at a given position.
+     * A feature with an empty name is returned if there's no feature at the given
+     * position.
+     * 
+ */ public void getFeature(io.grpc.examples.routeguide.Point request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A server-to-client streaming RPC.
+     * Obtains the Features available within the given Rectangle.  Results are
+     * streamed rather than returned at once (e.g. in a response message with a
+     * repeated field), as the rectangle may cover a large area and contain a
+     * huge number of features.
+     * 
+ */ public void listFeatures(io.grpc.examples.routeguide.Rectangle request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A client-to-server streaming RPC.
+     * Accepts a stream of Points on a route being traversed, returning a
+     * RouteSummary when traversal is completed.
+     * 
+ */ public io.grpc.stub.StreamObserver recordRoute( io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A Bidirectional streaming RPC.
+     * Accepts a stream of RouteNotes sent while a route is being traversed,
+     * while receiving other RouteNotes (e.g. from other users).
+     * 
+ */ public io.grpc.stub.StreamObserver routeChat( io.grpc.stub.StreamObserver responseObserver); } @@ -123,16 +173,51 @@ public class RouteGuideGrpc { } } + /** + *
+   * Interface exported by the server.
+   * 
+ */ public static interface RouteGuideBlockingClient { + /** + *
+     * A simple RPC.
+     * Obtains the feature at a given position.
+     * A feature with an empty name is returned if there's no feature at the given
+     * position.
+     * 
+ */ public io.grpc.examples.routeguide.Feature getFeature(io.grpc.examples.routeguide.Point request); + /** + *
+     * A server-to-client streaming RPC.
+     * Obtains the Features available within the given Rectangle.  Results are
+     * streamed rather than returned at once (e.g. in a response message with a
+     * repeated field), as the rectangle may cover a large area and contain a
+     * huge number of features.
+     * 
+ */ public java.util.Iterator listFeatures( io.grpc.examples.routeguide.Rectangle request); } + /** + *
+   * Interface exported by the server.
+   * 
+ */ public static interface RouteGuideFutureClient { + /** + *
+     * A simple RPC.
+     * Obtains the feature at a given position.
+     * A feature with an empty name is returned if there's no feature at the given
+     * position.
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture getFeature( io.grpc.examples.routeguide.Point request); } diff --git a/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java b/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java index 1bd73a00fa..aa9fa9030a 100644 --- a/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java +++ b/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java @@ -15,6 +15,8 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +/** + */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: load_balancer.proto") @@ -35,22 +37,38 @@ public class LoadBalancerGrpc { io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.grpclb.LoadBalanceRequest.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.grpclb.LoadBalanceResponse.getDefaultInstance())); + /** + * Creates a new async stub that supports all call types for the service + */ public static LoadBalancerStub newStub(io.grpc.Channel channel) { return new LoadBalancerStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static LoadBalancerBlockingStub newBlockingStub( io.grpc.Channel channel) { return new LoadBalancerBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static LoadBalancerFutureStub newFutureStub( io.grpc.Channel channel) { return new LoadBalancerFutureStub(channel); } + /** + */ public static interface LoadBalancer { + /** + *
+     * Bidirectional rpc to get a list of servers.
+     * 
+ */ public io.grpc.stub.StreamObserver balanceLoad( io.grpc.stub.StreamObserver responseObserver); } @@ -69,9 +87,13 @@ public class LoadBalancerGrpc { } } + /** + */ public static interface LoadBalancerBlockingClient { } + /** + */ public static interface LoadBalancerFutureClient { } diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java index 5685594181..6d05a07fdd 100644 --- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java +++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java @@ -15,6 +15,8 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +/** + */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: io/grpc/testing/integration/metrics.proto") @@ -44,25 +46,47 @@ public class MetricsServiceGrpc { io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Metrics.GaugeRequest.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Metrics.GaugeResponse.getDefaultInstance())); + /** + * Creates a new async stub that supports all call types for the service + */ public static MetricsServiceStub newStub(io.grpc.Channel channel) { return new MetricsServiceStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static MetricsServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { return new MetricsServiceBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static MetricsServiceFutureStub newFutureStub( io.grpc.Channel channel) { return new MetricsServiceFutureStub(channel); } + /** + */ public static interface MetricsService { + /** + *
+     * Returns the values of all the gauges that are currently being maintained by
+     * the service
+     * 
+ */ public void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * Returns the value of one gauge
+     * 
+ */ public void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request, io.grpc.stub.StreamObserver responseObserver); } @@ -87,16 +111,36 @@ public class MetricsServiceGrpc { } } + /** + */ public static interface MetricsServiceBlockingClient { + /** + *
+     * Returns the values of all the gauges that are currently being maintained by
+     * the service
+     * 
+ */ public java.util.Iterator getAllGauges( io.grpc.testing.integration.Metrics.EmptyMessage request); + /** + *
+     * Returns the value of one gauge
+     * 
+ */ public io.grpc.testing.integration.Metrics.GaugeResponse getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request); } + /** + */ public static interface MetricsServiceFutureClient { + /** + *
+     * Returns the value of one gauge
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture getGauge( io.grpc.testing.integration.Metrics.GaugeRequest request); } diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java index 77f0d0b9e8..f35ef154db 100644 --- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java +++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java @@ -15,6 +15,11 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +/** + *
+ * A service used to control reconnect server.
+ * 
+ */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: io/grpc/testing/integration/test.proto") @@ -44,25 +49,43 @@ public class ReconnectServiceGrpc { io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.ReconnectInfo.getDefaultInstance())); + /** + * Creates a new async stub that supports all call types for the service + */ public static ReconnectServiceStub newStub(io.grpc.Channel channel) { return new ReconnectServiceStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static ReconnectServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { return new ReconnectServiceBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static ReconnectServiceFutureStub newFutureStub( io.grpc.Channel channel) { return new ReconnectServiceFutureStub(channel); } + /** + *
+   * A service used to control reconnect server.
+   * 
+ */ public static interface ReconnectService { + /** + */ public void start(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver); + /** + */ public void stop(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver); } @@ -87,18 +110,36 @@ public class ReconnectServiceGrpc { } } + /** + *
+   * A service used to control reconnect server.
+   * 
+ */ public static interface ReconnectServiceBlockingClient { + /** + */ public com.google.protobuf.EmptyProtos.Empty start(com.google.protobuf.EmptyProtos.Empty request); + /** + */ public io.grpc.testing.integration.Messages.ReconnectInfo stop(com.google.protobuf.EmptyProtos.Empty request); } + /** + *
+   * A service used to control reconnect server.
+   * 
+ */ public static interface ReconnectServiceFutureClient { + /** + */ public com.google.common.util.concurrent.ListenableFuture start( com.google.protobuf.EmptyProtos.Empty request); + /** + */ public com.google.common.util.concurrent.ListenableFuture stop( com.google.protobuf.EmptyProtos.Empty request); } diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java index b633b788f6..242bf1ae93 100644 --- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java +++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java @@ -15,6 +15,12 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +/** + *
+ * A simple service to test the various types of RPCs and experiment with
+ * performance with various types of payload.
+ * 
+ */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: io/grpc/testing/integration/test.proto") @@ -80,37 +86,89 @@ public class TestServiceGrpc { io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance())); + /** + * Creates a new async stub that supports all call types for the service + */ public static TestServiceStub newStub(io.grpc.Channel channel) { return new TestServiceStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static TestServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { return new TestServiceBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static TestServiceFutureStub newFutureStub( io.grpc.Channel channel) { return new TestServiceFutureStub(channel); } + /** + *
+   * A simple service to test the various types of RPCs and experiment with
+   * performance with various types of payload.
+   * 
+ */ public static interface TestService { + /** + *
+     * One empty request followed by one empty response.
+     * 
+ */ public void emptyCall(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * One request followed by one response.
+     * 
+ */ public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * One request followed by a sequence of responses (streamed download).
+     * The server returns the payload with client desired type and sizes.
+     * 
+ */ public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests followed by one response (streamed upload).
+     * The server returns the aggregated size of client payload as the result.
+     * 
+ */ public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests with each request served by the server immediately.
+     * As one request could lead to multiple responses, this interface
+     * demonstrates the idea of full duplexing.
+     * 
+ */ public io.grpc.stub.StreamObserver fullDuplexCall( io.grpc.stub.StreamObserver responseObserver); + /** + *
+     * A sequence of requests followed by a sequence of responses.
+     * The server buffers all the client requests and then serves them in order. A
+     * stream of responses are returned to the client when the server starts with
+     * first request.
+     * 
+ */ public io.grpc.stub.StreamObserver halfDuplexCall( io.grpc.stub.StreamObserver responseObserver); } @@ -159,21 +217,59 @@ public class TestServiceGrpc { } } + /** + *
+   * A simple service to test the various types of RPCs and experiment with
+   * performance with various types of payload.
+   * 
+ */ public static interface TestServiceBlockingClient { + /** + *
+     * One empty request followed by one empty response.
+     * 
+ */ public com.google.protobuf.EmptyProtos.Empty emptyCall(com.google.protobuf.EmptyProtos.Empty request); + /** + *
+     * One request followed by one response.
+     * 
+ */ public io.grpc.testing.integration.Messages.SimpleResponse unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request); + /** + *
+     * One request followed by a sequence of responses (streamed download).
+     * The server returns the payload with client desired type and sizes.
+     * 
+ */ public java.util.Iterator streamingOutputCall( io.grpc.testing.integration.Messages.StreamingOutputCallRequest request); } + /** + *
+   * A simple service to test the various types of RPCs and experiment with
+   * performance with various types of payload.
+   * 
+ */ public static interface TestServiceFutureClient { + /** + *
+     * One empty request followed by one empty response.
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture emptyCall( com.google.protobuf.EmptyProtos.Empty request); + /** + *
+     * One request followed by one response.
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture unaryCall( io.grpc.testing.integration.Messages.SimpleRequest request); } diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java index 653301f4ee..7c6822ac5f 100644 --- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java +++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java @@ -15,6 +15,12 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +/** + *
+ * A simple service NOT implemented at servers so clients can test for
+ * that case.
+ * 
+ */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)", comments = "Source: io/grpc/testing/integration/test.proto") @@ -35,22 +41,42 @@ public class UnimplementedServiceGrpc { io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.getDefaultInstance())); + /** + * Creates a new async stub that supports all call types for the service + */ public static UnimplementedServiceStub newStub(io.grpc.Channel channel) { return new UnimplementedServiceStub(channel); } + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ public static UnimplementedServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { return new UnimplementedServiceBlockingStub(channel); } + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ public static UnimplementedServiceFutureStub newFutureStub( io.grpc.Channel channel) { return new UnimplementedServiceFutureStub(channel); } + /** + *
+   * A simple service NOT implemented at servers so clients can test for
+   * that case.
+   * 
+ */ public static interface UnimplementedService { + /** + *
+     * A call that no server should implement
+     * 
+ */ public void unimplementedCall(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver); } @@ -69,13 +95,35 @@ public class UnimplementedServiceGrpc { } } + /** + *
+   * A simple service NOT implemented at servers so clients can test for
+   * that case.
+   * 
+ */ public static interface UnimplementedServiceBlockingClient { + /** + *
+     * A call that no server should implement
+     * 
+ */ public com.google.protobuf.EmptyProtos.Empty unimplementedCall(com.google.protobuf.EmptyProtos.Empty request); } + /** + *
+   * A simple service NOT implemented at servers so clients can test for
+   * that case.
+   * 
+ */ public static interface UnimplementedServiceFutureClient { + /** + *
+     * A call that no server should implement
+     * 
+ */ public com.google.common.util.concurrent.ListenableFuture unimplementedCall( com.google.protobuf.EmptyProtos.Empty request); }