Skip to content

Commit e6bd6e0

Browse files
committed
Tidy up gitignore, remove pycache entries from git
1 parent 5c5ef47 commit e6bd6e0

9 files changed

Lines changed: 1537 additions & 1 deletion

File tree

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
### Maven ###
12
target/
23
!.mvn/wrapper/maven-wrapper.jar
34
!**/src/main/**/target/
45
!**/src/test/**/target/
6+
.flattened-pom.xml
57

68
### IntelliJ IDEA ###
79
.idea/
@@ -32,4 +34,7 @@ build/
3234
.vscode/
3335

3436
### Mac OS ###
35-
.DS_Store
37+
.DS_Store
38+
39+
### Python ###
40+
__pycache__/
Lines changed: 323 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,323 @@
1+
package helloworld;
2+
3+
import static io.grpc.MethodDescriptor.generateFullMethodName;
4+
5+
/**
6+
* <pre>
7+
* The greeting service definition.
8+
* </pre>
9+
*/
10+
@javax.annotation.Generated(
11+
value = "by gRPC proto compiler (version 1.63.1)",
12+
comments = "Source: hello.proto")
13+
@io.grpc.stub.annotations.GrpcGenerated
14+
public final class GreeterGrpc {
15+
16+
private GreeterGrpc() {}
17+
18+
public static final java.lang.String SERVICE_NAME = "helloworld.Greeter";
19+
20+
// Static method descriptors that strictly reflect the proto.
21+
private static volatile io.grpc.MethodDescriptor<helloworld.HelloRequest,
22+
helloworld.HelloReply> getSayHelloMethod;
23+
24+
@io.grpc.stub.annotations.RpcMethod(
25+
fullMethodName = SERVICE_NAME + '/' + "SayHello",
26+
requestType = helloworld.HelloRequest.class,
27+
responseType = helloworld.HelloReply.class,
28+
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
29+
public static io.grpc.MethodDescriptor<helloworld.HelloRequest,
30+
helloworld.HelloReply> getSayHelloMethod() {
31+
io.grpc.MethodDescriptor<helloworld.HelloRequest, helloworld.HelloReply> getSayHelloMethod;
32+
if ((getSayHelloMethod = GreeterGrpc.getSayHelloMethod) == null) {
33+
synchronized (GreeterGrpc.class) {
34+
if ((getSayHelloMethod = GreeterGrpc.getSayHelloMethod) == null) {
35+
GreeterGrpc.getSayHelloMethod = getSayHelloMethod =
36+
io.grpc.MethodDescriptor.<helloworld.HelloRequest, helloworld.HelloReply>newBuilder()
37+
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
38+
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SayHello"))
39+
.setSampledToLocalTracing(true)
40+
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
41+
helloworld.HelloRequest.getDefaultInstance()))
42+
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
43+
helloworld.HelloReply.getDefaultInstance()))
44+
.setSchemaDescriptor(new GreeterMethodDescriptorSupplier("SayHello"))
45+
.build();
46+
}
47+
}
48+
}
49+
return getSayHelloMethod;
50+
}
51+
52+
/**
53+
* Creates a new async stub that supports all call types for the service
54+
*/
55+
public static GreeterStub newStub(io.grpc.Channel channel) {
56+
io.grpc.stub.AbstractStub.StubFactory<GreeterStub> factory =
57+
new io.grpc.stub.AbstractStub.StubFactory<GreeterStub>() {
58+
@java.lang.Override
59+
public GreeterStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
60+
return new GreeterStub(channel, callOptions);
61+
}
62+
};
63+
return GreeterStub.newStub(factory, channel);
64+
}
65+
66+
/**
67+
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
68+
*/
69+
public static GreeterBlockingStub newBlockingStub(
70+
io.grpc.Channel channel) {
71+
io.grpc.stub.AbstractStub.StubFactory<GreeterBlockingStub> factory =
72+
new io.grpc.stub.AbstractStub.StubFactory<GreeterBlockingStub>() {
73+
@java.lang.Override
74+
public GreeterBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
75+
return new GreeterBlockingStub(channel, callOptions);
76+
}
77+
};
78+
return GreeterBlockingStub.newStub(factory, channel);
79+
}
80+
81+
/**
82+
* Creates a new ListenableFuture-style stub that supports unary calls on the service
83+
*/
84+
public static GreeterFutureStub newFutureStub(
85+
io.grpc.Channel channel) {
86+
io.grpc.stub.AbstractStub.StubFactory<GreeterFutureStub> factory =
87+
new io.grpc.stub.AbstractStub.StubFactory<GreeterFutureStub>() {
88+
@java.lang.Override
89+
public GreeterFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
90+
return new GreeterFutureStub(channel, callOptions);
91+
}
92+
};
93+
return GreeterFutureStub.newStub(factory, channel);
94+
}
95+
96+
/**
97+
* <pre>
98+
* The greeting service definition.
99+
* </pre>
100+
*/
101+
public interface AsyncService {
102+
103+
/**
104+
* <pre>
105+
* Sends a greeting
106+
* </pre>
107+
*/
108+
default void sayHello(helloworld.HelloRequest request,
109+
io.grpc.stub.StreamObserver<helloworld.HelloReply> responseObserver) {
110+
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSayHelloMethod(), responseObserver);
111+
}
112+
}
113+
114+
/**
115+
* Base class for the server implementation of the service Greeter.
116+
* <pre>
117+
* The greeting service definition.
118+
* </pre>
119+
*/
120+
public static abstract class GreeterImplBase
121+
implements io.grpc.BindableService, AsyncService {
122+
123+
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
124+
return GreeterGrpc.bindService(this);
125+
}
126+
}
127+
128+
/**
129+
* A stub to allow clients to do asynchronous rpc calls to service Greeter.
130+
* <pre>
131+
* The greeting service definition.
132+
* </pre>
133+
*/
134+
public static final class GreeterStub
135+
extends io.grpc.stub.AbstractAsyncStub<GreeterStub> {
136+
private GreeterStub(
137+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
138+
super(channel, callOptions);
139+
}
140+
141+
@java.lang.Override
142+
protected GreeterStub build(
143+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
144+
return new GreeterStub(channel, callOptions);
145+
}
146+
147+
/**
148+
* <pre>
149+
* Sends a greeting
150+
* </pre>
151+
*/
152+
public void sayHello(helloworld.HelloRequest request,
153+
io.grpc.stub.StreamObserver<helloworld.HelloReply> responseObserver) {
154+
io.grpc.stub.ClientCalls.asyncUnaryCall(
155+
getChannel().newCall(getSayHelloMethod(), getCallOptions()), request, responseObserver);
156+
}
157+
}
158+
159+
/**
160+
* A stub to allow clients to do synchronous rpc calls to service Greeter.
161+
* <pre>
162+
* The greeting service definition.
163+
* </pre>
164+
*/
165+
public static final class GreeterBlockingStub
166+
extends io.grpc.stub.AbstractBlockingStub<GreeterBlockingStub> {
167+
private GreeterBlockingStub(
168+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
169+
super(channel, callOptions);
170+
}
171+
172+
@java.lang.Override
173+
protected GreeterBlockingStub build(
174+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
175+
return new GreeterBlockingStub(channel, callOptions);
176+
}
177+
178+
/**
179+
* <pre>
180+
* Sends a greeting
181+
* </pre>
182+
*/
183+
public helloworld.HelloReply sayHello(helloworld.HelloRequest request) {
184+
return io.grpc.stub.ClientCalls.blockingUnaryCall(
185+
getChannel(), getSayHelloMethod(), getCallOptions(), request);
186+
}
187+
}
188+
189+
/**
190+
* A stub to allow clients to do ListenableFuture-style rpc calls to service Greeter.
191+
* <pre>
192+
* The greeting service definition.
193+
* </pre>
194+
*/
195+
public static final class GreeterFutureStub
196+
extends io.grpc.stub.AbstractFutureStub<GreeterFutureStub> {
197+
private GreeterFutureStub(
198+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
199+
super(channel, callOptions);
200+
}
201+
202+
@java.lang.Override
203+
protected GreeterFutureStub build(
204+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
205+
return new GreeterFutureStub(channel, callOptions);
206+
}
207+
208+
/**
209+
* <pre>
210+
* Sends a greeting
211+
* </pre>
212+
*/
213+
public com.google.common.util.concurrent.ListenableFuture<helloworld.HelloReply> sayHello(
214+
helloworld.HelloRequest request) {
215+
return io.grpc.stub.ClientCalls.futureUnaryCall(
216+
getChannel().newCall(getSayHelloMethod(), getCallOptions()), request);
217+
}
218+
}
219+
220+
private static final int METHODID_SAY_HELLO = 0;
221+
222+
private static final class MethodHandlers<Req, Resp> implements
223+
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
224+
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
225+
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
226+
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
227+
private final AsyncService serviceImpl;
228+
private final int methodId;
229+
230+
MethodHandlers(AsyncService serviceImpl, int methodId) {
231+
this.serviceImpl = serviceImpl;
232+
this.methodId = methodId;
233+
}
234+
235+
@java.lang.Override
236+
@java.lang.SuppressWarnings("unchecked")
237+
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
238+
switch (methodId) {
239+
case METHODID_SAY_HELLO:
240+
serviceImpl.sayHello((helloworld.HelloRequest) request,
241+
(io.grpc.stub.StreamObserver<helloworld.HelloReply>) responseObserver);
242+
break;
243+
default:
244+
throw new AssertionError();
245+
}
246+
}
247+
248+
@java.lang.Override
249+
@java.lang.SuppressWarnings("unchecked")
250+
public io.grpc.stub.StreamObserver<Req> invoke(
251+
io.grpc.stub.StreamObserver<Resp> responseObserver) {
252+
switch (methodId) {
253+
default:
254+
throw new AssertionError();
255+
}
256+
}
257+
}
258+
259+
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
260+
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
261+
.addMethod(
262+
getSayHelloMethod(),
263+
io.grpc.stub.ServerCalls.asyncUnaryCall(
264+
new MethodHandlers<
265+
helloworld.HelloRequest,
266+
helloworld.HelloReply>(
267+
service, METHODID_SAY_HELLO)))
268+
.build();
269+
}
270+
271+
private static abstract class GreeterBaseDescriptorSupplier
272+
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
273+
GreeterBaseDescriptorSupplier() {}
274+
275+
@java.lang.Override
276+
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
277+
return helloworld.HelloWorldProto.getDescriptor();
278+
}
279+
280+
@java.lang.Override
281+
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
282+
return getFileDescriptor().findServiceByName("Greeter");
283+
}
284+
}
285+
286+
private static final class GreeterFileDescriptorSupplier
287+
extends GreeterBaseDescriptorSupplier {
288+
GreeterFileDescriptorSupplier() {}
289+
}
290+
291+
private static final class GreeterMethodDescriptorSupplier
292+
extends GreeterBaseDescriptorSupplier
293+
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
294+
private final java.lang.String methodName;
295+
296+
GreeterMethodDescriptorSupplier(java.lang.String methodName) {
297+
this.methodName = methodName;
298+
}
299+
300+
@java.lang.Override
301+
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
302+
return getServiceDescriptor().findMethodByName(methodName);
303+
}
304+
}
305+
306+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
307+
308+
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
309+
io.grpc.ServiceDescriptor result = serviceDescriptor;
310+
if (result == null) {
311+
synchronized (GreeterGrpc.class) {
312+
result = serviceDescriptor;
313+
if (result == null) {
314+
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
315+
.setSchemaDescriptor(new GreeterFileDescriptorSupplier())
316+
.addMethod(getSayHelloMethod())
317+
.build();
318+
}
319+
}
320+
}
321+
return result;
322+
}
323+
}

0 commit comments

Comments
 (0)