Skip to content

Commit 7e8b504

Browse files
author
nmittler
committed
Add javadoc to grpc codegen based on proto docs
Fixes grpc#1612
1 parent 00f8f34 commit 7e8b504

15 files changed

Lines changed: 954 additions & 2 deletions

File tree

benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/BenchmarkServiceGrpc.java

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
1616
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
1717

18+
/**
19+
*/
1820
@javax.annotation.Generated(
1921
value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)",
2022
comments = "Source: services.proto")
@@ -44,25 +46,48 @@ private BenchmarkServiceGrpc() {}
4446
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.benchmarks.proto.Messages.SimpleRequest.getDefaultInstance()),
4547
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.benchmarks.proto.Messages.SimpleResponse.getDefaultInstance()));
4648

49+
/**
50+
* Creates a new async stub that supports all call types for the service
51+
*/
4752
public static BenchmarkServiceStub newStub(io.grpc.Channel channel) {
4853
return new BenchmarkServiceStub(channel);
4954
}
5055

56+
/**
57+
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
58+
*/
5159
public static BenchmarkServiceBlockingStub newBlockingStub(
5260
io.grpc.Channel channel) {
5361
return new BenchmarkServiceBlockingStub(channel);
5462
}
5563

64+
/**
65+
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
66+
*/
5667
public static BenchmarkServiceFutureStub newFutureStub(
5768
io.grpc.Channel channel) {
5869
return new BenchmarkServiceFutureStub(channel);
5970
}
6071

72+
/**
73+
*/
6174
public static interface BenchmarkService {
6275

76+
/**
77+
* <pre>
78+
* One request followed by one response.
79+
* The server returns the client payload as-is.
80+
* </pre>
81+
*/
6382
public void unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request,
6483
io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Messages.SimpleResponse> responseObserver);
6584

85+
/**
86+
* <pre>
87+
* One request followed by one response.
88+
* The server returns the client payload as-is.
89+
* </pre>
90+
*/
6691
public io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Messages.SimpleRequest> streamingCall(
6792
io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Messages.SimpleResponse> responseObserver);
6893
}
@@ -87,13 +112,29 @@ public io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Messages.SimpleReque
87112
}
88113
}
89114

115+
/**
116+
*/
90117
public static interface BenchmarkServiceBlockingClient {
91118

119+
/**
120+
* <pre>
121+
* One request followed by one response.
122+
* The server returns the client payload as-is.
123+
* </pre>
124+
*/
92125
public io.grpc.benchmarks.proto.Messages.SimpleResponse unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request);
93126
}
94127

128+
/**
129+
*/
95130
public static interface BenchmarkServiceFutureClient {
96131

132+
/**
133+
* <pre>
134+
* One request followed by one response.
135+
* The server returns the client payload as-is.
136+
* </pre>
137+
*/
97138
public com.google.common.util.concurrent.ListenableFuture<io.grpc.benchmarks.proto.Messages.SimpleResponse> unaryCall(
98139
io.grpc.benchmarks.proto.Messages.SimpleRequest request);
99140
}

benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/WorkerServiceGrpc.java

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
1616
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
1717

18+
/**
19+
*/
1820
@javax.annotation.Generated(
1921
value = "by gRPC proto compiler (version 0.14.0-SNAPSHOT)",
2022
comments = "Source: services.proto")
@@ -62,31 +64,72 @@ private WorkerServiceGrpc() {}
6264
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.benchmarks.proto.Control.Void.getDefaultInstance()),
6365
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.benchmarks.proto.Control.Void.getDefaultInstance()));
6466

67+
/**
68+
* Creates a new async stub that supports all call types for the service
69+
*/
6570
public static WorkerServiceStub newStub(io.grpc.Channel channel) {
6671
return new WorkerServiceStub(channel);
6772
}
6873

74+
/**
75+
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
76+
*/
6977
public static WorkerServiceBlockingStub newBlockingStub(
7078
io.grpc.Channel channel) {
7179
return new WorkerServiceBlockingStub(channel);
7280
}
7381

82+
/**
83+
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
84+
*/
7485
public static WorkerServiceFutureStub newFutureStub(
7586
io.grpc.Channel channel) {
7687
return new WorkerServiceFutureStub(channel);
7788
}
7889

90+
/**
91+
*/
7992
public static interface WorkerService {
8093

94+
/**
95+
* <pre>
96+
* Start server with specified workload.
97+
* First request sent specifies the ServerConfig followed by ServerStatus
98+
* response. After that, a "Mark" can be sent anytime to request the latest
99+
* stats. Closing the stream will initiate shutdown of the test server
100+
* and once the shutdown has finished, the OK status is sent to terminate
101+
* this RPC.
102+
* </pre>
103+
*/
81104
public io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Control.ServerArgs> runServer(
82105
io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Control.ServerStatus> responseObserver);
83106

107+
/**
108+
* <pre>
109+
* Start client with specified workload.
110+
* First request sent specifies the ClientConfig followed by ClientStatus
111+
* response. After that, a "Mark" can be sent anytime to request the latest
112+
* stats. Closing the stream will initiate shutdown of the test client
113+
* and once the shutdown has finished, the OK status is sent to terminate
114+
* this RPC.
115+
* </pre>
116+
*/
84117
public io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Control.ClientArgs> runClient(
85118
io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Control.ClientStatus> responseObserver);
86119

120+
/**
121+
* <pre>
122+
* Just return the core count - unary call
123+
* </pre>
124+
*/
87125
public void coreCount(io.grpc.benchmarks.proto.Control.CoreRequest request,
88126
io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Control.CoreResponse> responseObserver);
89127

128+
/**
129+
* <pre>
130+
* Quit this worker
131+
* </pre>
132+
*/
90133
public void quitWorker(io.grpc.benchmarks.proto.Control.Void request,
91134
io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Control.Void> responseObserver);
92135
}
@@ -123,18 +166,42 @@ public void quitWorker(io.grpc.benchmarks.proto.Control.Void request,
123166
}
124167
}
125168

169+
/**
170+
*/
126171
public static interface WorkerServiceBlockingClient {
127172

173+
/**
174+
* <pre>
175+
* Just return the core count - unary call
176+
* </pre>
177+
*/
128178
public io.grpc.benchmarks.proto.Control.CoreResponse coreCount(io.grpc.benchmarks.proto.Control.CoreRequest request);
129179

180+
/**
181+
* <pre>
182+
* Quit this worker
183+
* </pre>
184+
*/
130185
public io.grpc.benchmarks.proto.Control.Void quitWorker(io.grpc.benchmarks.proto.Control.Void request);
131186
}
132187

188+
/**
189+
*/
133190
public static interface WorkerServiceFutureClient {
134191

192+
/**
193+
* <pre>
194+
* Just return the core count - unary call
195+
* </pre>
196+
*/
135197
public com.google.common.util.concurrent.ListenableFuture<io.grpc.benchmarks.proto.Control.CoreResponse> coreCount(
136198
io.grpc.benchmarks.proto.Control.CoreRequest request);
137199

200+
/**
201+
* <pre>
202+
* Quit this worker
203+
* </pre>
204+
*/
138205
public com.google.common.util.concurrent.ListenableFuture<io.grpc.benchmarks.proto.Control.Void> quitWorker(
139206
io.grpc.benchmarks.proto.Control.Void request);
140207
}

0 commit comments

Comments
 (0)