in.ashwanthkumar.suuchi.rpc.generated.SuuchiReadGrpc Maven / Gradle / Ivy
package in.ashwanthkumar.suuchi.rpc.generated;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
/**
*
* SuuchiRead service which can be used for serving read-only datasets
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.0.1)",
comments = "Source: suuchi.proto")
public class SuuchiReadGrpc {
private SuuchiReadGrpc() {}
public static final String SERVICE_NAME = "SuuchiRead";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_GET =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"SuuchiRead", "Get"),
io.grpc.protobuf.ProtoUtils.marshaller(in.ashwanthkumar.suuchi.rpc.generated.SuuchiRPC.GetRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(in.ashwanthkumar.suuchi.rpc.generated.SuuchiRPC.GetResponse.getDefaultInstance()));
/**
* Creates a new async stub that supports all call types for the service
*/
public static SuuchiReadStub newStub(io.grpc.Channel channel) {
return new SuuchiReadStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static SuuchiReadBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new SuuchiReadBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
*/
public static SuuchiReadFutureStub newFutureStub(
io.grpc.Channel channel) {
return new SuuchiReadFutureStub(channel);
}
/**
*
* SuuchiRead service which can be used for serving read-only datasets
*
*/
public static abstract class SuuchiReadImplBase implements io.grpc.BindableService {
/**
*
* TODO - Add scan method to this service
*
*/
public void get(in.ashwanthkumar.suuchi.rpc.generated.SuuchiRPC.GetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_GET, responseObserver);
}
@java.lang.Override public io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_GET,
asyncUnaryCall(
new MethodHandlers<
in.ashwanthkumar.suuchi.rpc.generated.SuuchiRPC.GetRequest,
in.ashwanthkumar.suuchi.rpc.generated.SuuchiRPC.GetResponse>(
this, METHODID_GET)))
.build();
}
}
/**
*
* SuuchiRead service which can be used for serving read-only datasets
*
*/
public static final class SuuchiReadStub extends io.grpc.stub.AbstractStub {
private SuuchiReadStub(io.grpc.Channel channel) {
super(channel);
}
private SuuchiReadStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SuuchiReadStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SuuchiReadStub(channel, callOptions);
}
/**
*
* TODO - Add scan method to this service
*
*/
public void get(in.ashwanthkumar.suuchi.rpc.generated.SuuchiRPC.GetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_GET, getCallOptions()), request, responseObserver);
}
}
/**
*
* SuuchiRead service which can be used for serving read-only datasets
*
*/
public static final class SuuchiReadBlockingStub extends io.grpc.stub.AbstractStub {
private SuuchiReadBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private SuuchiReadBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SuuchiReadBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SuuchiReadBlockingStub(channel, callOptions);
}
/**
*
* TODO - Add scan method to this service
*
*/
public in.ashwanthkumar.suuchi.rpc.generated.SuuchiRPC.GetResponse get(in.ashwanthkumar.suuchi.rpc.generated.SuuchiRPC.GetRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_GET, getCallOptions(), request);
}
}
/**
*
* SuuchiRead service which can be used for serving read-only datasets
*
*/
public static final class SuuchiReadFutureStub extends io.grpc.stub.AbstractStub {
private SuuchiReadFutureStub(io.grpc.Channel channel) {
super(channel);
}
private SuuchiReadFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SuuchiReadFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SuuchiReadFutureStub(channel, callOptions);
}
/**
*
* TODO - Add scan method to this service
*
*/
public com.google.common.util.concurrent.ListenableFuture get(
in.ashwanthkumar.suuchi.rpc.generated.SuuchiRPC.GetRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_GET, getCallOptions()), request);
}
}
private static final int METHODID_GET = 0;
private static 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 SuuchiReadImplBase serviceImpl;
private final int methodId;
public MethodHandlers(SuuchiReadImplBase 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_GET:
serviceImpl.get((in.ashwanthkumar.suuchi.rpc.generated.SuuchiRPC.GetRequest) 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) {
default:
throw new AssertionError();
}
}
}
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
return new io.grpc.ServiceDescriptor(SERVICE_NAME,
METHOD_GET);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy