
io.rouz.greeter.GreeterGrpc Maven / Gradle / Ivy
package io.rouz.greeter;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.15.1)",
comments = "Source: greeter.proto")
public final class GreeterGrpc {
private GreeterGrpc() {}
public static final String SERVICE_NAME = "io.rouz.greeter.Greeter";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGreetMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Greet",
requestType = io.rouz.greeter.GreetRequest.class,
responseType = io.rouz.greeter.GreetReply.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGreetMethod() {
io.grpc.MethodDescriptor getGreetMethod;
if ((getGreetMethod = GreeterGrpc.getGreetMethod) == null) {
synchronized (GreeterGrpc.class) {
if ((getGreetMethod = GreeterGrpc.getGreetMethod) == null) {
GreeterGrpc.getGreetMethod = getGreetMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"io.rouz.greeter.Greeter", "Greet"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.rouz.greeter.GreetRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.rouz.greeter.GreetReply.getDefaultInstance()))
.setSchemaDescriptor(new GreeterMethodDescriptorSupplier("Greet"))
.build();
}
}
}
return getGreetMethod;
}
private static volatile io.grpc.MethodDescriptor getGreetServerStreamMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GreetServerStream",
requestType = io.rouz.greeter.GreetRequest.class,
responseType = io.rouz.greeter.GreetReply.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getGreetServerStreamMethod() {
io.grpc.MethodDescriptor getGreetServerStreamMethod;
if ((getGreetServerStreamMethod = GreeterGrpc.getGreetServerStreamMethod) == null) {
synchronized (GreeterGrpc.class) {
if ((getGreetServerStreamMethod = GreeterGrpc.getGreetServerStreamMethod) == null) {
GreeterGrpc.getGreetServerStreamMethod = getGreetServerStreamMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(
"io.rouz.greeter.Greeter", "GreetServerStream"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.rouz.greeter.GreetRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.rouz.greeter.GreetReply.getDefaultInstance()))
.setSchemaDescriptor(new GreeterMethodDescriptorSupplier("GreetServerStream"))
.build();
}
}
}
return getGreetServerStreamMethod;
}
private static volatile io.grpc.MethodDescriptor getGreetClientStreamMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GreetClientStream",
requestType = io.rouz.greeter.GreetRequest.class,
responseType = io.rouz.greeter.GreetReply.class,
methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
public static io.grpc.MethodDescriptor getGreetClientStreamMethod() {
io.grpc.MethodDescriptor getGreetClientStreamMethod;
if ((getGreetClientStreamMethod = GreeterGrpc.getGreetClientStreamMethod) == null) {
synchronized (GreeterGrpc.class) {
if ((getGreetClientStreamMethod = GreeterGrpc.getGreetClientStreamMethod) == null) {
GreeterGrpc.getGreetClientStreamMethod = getGreetClientStreamMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
.setFullMethodName(generateFullMethodName(
"io.rouz.greeter.Greeter", "GreetClientStream"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.rouz.greeter.GreetRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.rouz.greeter.GreetReply.getDefaultInstance()))
.setSchemaDescriptor(new GreeterMethodDescriptorSupplier("GreetClientStream"))
.build();
}
}
}
return getGreetClientStreamMethod;
}
private static volatile io.grpc.MethodDescriptor getGreetBidirectionalMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GreetBidirectional",
requestType = io.rouz.greeter.GreetRequest.class,
responseType = io.rouz.greeter.GreetReply.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getGreetBidirectionalMethod() {
io.grpc.MethodDescriptor getGreetBidirectionalMethod;
if ((getGreetBidirectionalMethod = GreeterGrpc.getGreetBidirectionalMethod) == null) {
synchronized (GreeterGrpc.class) {
if ((getGreetBidirectionalMethod = GreeterGrpc.getGreetBidirectionalMethod) == null) {
GreeterGrpc.getGreetBidirectionalMethod = getGreetBidirectionalMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"io.rouz.greeter.Greeter", "GreetBidirectional"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.rouz.greeter.GreetRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.rouz.greeter.GreetReply.getDefaultInstance()))
.setSchemaDescriptor(new GreeterMethodDescriptorSupplier("GreetBidirectional"))
.build();
}
}
}
return getGreetBidirectionalMethod;
}
/**
* 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 calls on the service
*/
public static GreeterFutureStub newFutureStub(
io.grpc.Channel channel) {
return new GreeterFutureStub(channel);
}
/**
*/
public static abstract class GreeterImplBase implements io.grpc.BindableService {
/**
*/
public void greet(io.rouz.greeter.GreetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGreetMethod(), responseObserver);
}
/**
*/
public void greetServerStream(io.rouz.greeter.GreetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGreetServerStreamMethod(), responseObserver);
}
/**
*/
public io.grpc.stub.StreamObserver greetClientStream(
io.grpc.stub.StreamObserver responseObserver) {
return asyncUnimplementedStreamingCall(getGreetClientStreamMethod(), responseObserver);
}
/**
*/
public io.grpc.stub.StreamObserver greetBidirectional(
io.grpc.stub.StreamObserver responseObserver) {
return asyncUnimplementedStreamingCall(getGreetBidirectionalMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGreetMethod(),
asyncUnaryCall(
new MethodHandlers<
io.rouz.greeter.GreetRequest,
io.rouz.greeter.GreetReply>(
this, METHODID_GREET)))
.addMethod(
getGreetServerStreamMethod(),
asyncServerStreamingCall(
new MethodHandlers<
io.rouz.greeter.GreetRequest,
io.rouz.greeter.GreetReply>(
this, METHODID_GREET_SERVER_STREAM)))
.addMethod(
getGreetClientStreamMethod(),
asyncClientStreamingCall(
new MethodHandlers<
io.rouz.greeter.GreetRequest,
io.rouz.greeter.GreetReply>(
this, METHODID_GREET_CLIENT_STREAM)))
.addMethod(
getGreetBidirectionalMethod(),
asyncBidiStreamingCall(
new MethodHandlers<
io.rouz.greeter.GreetRequest,
io.rouz.greeter.GreetReply>(
this, METHODID_GREET_BIDIRECTIONAL)))
.build();
}
}
/**
*/
public static final class GreeterStub extends io.grpc.stub.AbstractStub {
private GreeterStub(io.grpc.Channel channel) {
super(channel);
}
private GreeterStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GreeterStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new GreeterStub(channel, callOptions);
}
/**
*/
public void greet(io.rouz.greeter.GreetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGreetMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void greetServerStream(io.rouz.greeter.GreetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncServerStreamingCall(
getChannel().newCall(getGreetServerStreamMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public io.grpc.stub.StreamObserver greetClientStream(
io.grpc.stub.StreamObserver responseObserver) {
return asyncClientStreamingCall(
getChannel().newCall(getGreetClientStreamMethod(), getCallOptions()), responseObserver);
}
/**
*/
public io.grpc.stub.StreamObserver greetBidirectional(
io.grpc.stub.StreamObserver responseObserver) {
return asyncBidiStreamingCall(
getChannel().newCall(getGreetBidirectionalMethod(), getCallOptions()), responseObserver);
}
}
/**
*/
public static final class GreeterBlockingStub extends io.grpc.stub.AbstractStub {
private GreeterBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private GreeterBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GreeterBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new GreeterBlockingStub(channel, callOptions);
}
/**
*/
public io.rouz.greeter.GreetReply greet(io.rouz.greeter.GreetRequest request) {
return blockingUnaryCall(
getChannel(), getGreetMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator greetServerStream(
io.rouz.greeter.GreetRequest request) {
return blockingServerStreamingCall(
getChannel(), getGreetServerStreamMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class GreeterFutureStub extends io.grpc.stub.AbstractStub {
private GreeterFutureStub(io.grpc.Channel channel) {
super(channel);
}
private GreeterFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GreeterFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new GreeterFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture greet(
io.rouz.greeter.GreetRequest request) {
return futureUnaryCall(
getChannel().newCall(getGreetMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GREET = 0;
private static final int METHODID_GREET_SERVER_STREAM = 1;
private static final int METHODID_GREET_CLIENT_STREAM = 2;
private static final int METHODID_GREET_BIDIRECTIONAL = 3;
private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final GreeterImplBase serviceImpl;
private final int methodId;
MethodHandlers(GreeterImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_GREET:
serviceImpl.greet((io.rouz.greeter.GreetRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GREET_SERVER_STREAM:
serviceImpl.greetServerStream((io.rouz.greeter.GreetRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_GREET_CLIENT_STREAM:
return (io.grpc.stub.StreamObserver) serviceImpl.greetClientStream(
(io.grpc.stub.StreamObserver) responseObserver);
case METHODID_GREET_BIDIRECTIONAL:
return (io.grpc.stub.StreamObserver) serviceImpl.greetBidirectional(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
private static abstract class GreeterBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
GreeterBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.rouz.greeter.GreeterOuterClass.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Greeter");
}
}
private static final class GreeterFileDescriptorSupplier
extends GreeterBaseDescriptorSupplier {
GreeterFileDescriptorSupplier() {}
}
private static final class GreeterMethodDescriptorSupplier
extends GreeterBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
GreeterMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (GreeterGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new GreeterFileDescriptorSupplier())
.addMethod(getGreetMethod())
.addMethod(getGreetServerStreamMethod())
.addMethod(getGreetClientStreamMethod())
.addMethod(getGreetBidirectionalMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy