![JAR search and dependency download from the Maven repository](/logo.png)
net.spals.appbuilder.app.examples.grpc.sample.SampleServiceV2Grpc Maven / Gradle / Ivy
package net.spals.appbuilder.app.examples.grpc.sample;
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.11.0)",
comments = "Source: sample_routes_v2.proto")
public final class SampleServiceV2Grpc {
private SampleServiceV2Grpc() {}
public static final String SERVICE_NAME = "SampleServiceV2";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
@java.lang.Deprecated // Use {@link #getGetSampleV2Method()} instead.
public static final io.grpc.MethodDescriptor METHOD_GET_SAMPLE_V2 = getGetSampleV2MethodHelper();
private static volatile io.grpc.MethodDescriptor getGetSampleV2Method;
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static io.grpc.MethodDescriptor getGetSampleV2Method() {
return getGetSampleV2MethodHelper();
}
private static io.grpc.MethodDescriptor getGetSampleV2MethodHelper() {
io.grpc.MethodDescriptor getGetSampleV2Method;
if ((getGetSampleV2Method = SampleServiceV2Grpc.getGetSampleV2Method) == null) {
synchronized (SampleServiceV2Grpc.class) {
if ((getGetSampleV2Method = SampleServiceV2Grpc.getGetSampleV2Method) == null) {
SampleServiceV2Grpc.getGetSampleV2Method = getGetSampleV2Method =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"SampleServiceV2", "GetSampleV2"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
net.spals.appbuilder.app.examples.grpc.sample.SampleRequestV2.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
net.spals.appbuilder.app.examples.grpc.sample.SampleResponseV2.getDefaultInstance()))
.setSchemaDescriptor(new SampleServiceV2MethodDescriptorSupplier("GetSampleV2"))
.build();
}
}
}
return getGetSampleV2Method;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static SampleServiceV2Stub newStub(io.grpc.Channel channel) {
return new SampleServiceV2Stub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static SampleServiceV2BlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new SampleServiceV2BlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static SampleServiceV2FutureStub newFutureStub(
io.grpc.Channel channel) {
return new SampleServiceV2FutureStub(channel);
}
/**
*/
public static abstract class SampleServiceV2ImplBase implements io.grpc.BindableService {
/**
*/
public void getSampleV2(net.spals.appbuilder.app.examples.grpc.sample.SampleRequestV2 request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetSampleV2MethodHelper(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetSampleV2MethodHelper(),
asyncUnaryCall(
new MethodHandlers<
net.spals.appbuilder.app.examples.grpc.sample.SampleRequestV2,
net.spals.appbuilder.app.examples.grpc.sample.SampleResponseV2>(
this, METHODID_GET_SAMPLE_V2)))
.build();
}
}
/**
*/
public static final class SampleServiceV2Stub extends io.grpc.stub.AbstractStub {
private SampleServiceV2Stub(io.grpc.Channel channel) {
super(channel);
}
private SampleServiceV2Stub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SampleServiceV2Stub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SampleServiceV2Stub(channel, callOptions);
}
/**
*/
public void getSampleV2(net.spals.appbuilder.app.examples.grpc.sample.SampleRequestV2 request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetSampleV2MethodHelper(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class SampleServiceV2BlockingStub extends io.grpc.stub.AbstractStub {
private SampleServiceV2BlockingStub(io.grpc.Channel channel) {
super(channel);
}
private SampleServiceV2BlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SampleServiceV2BlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SampleServiceV2BlockingStub(channel, callOptions);
}
/**
*/
public net.spals.appbuilder.app.examples.grpc.sample.SampleResponseV2 getSampleV2(net.spals.appbuilder.app.examples.grpc.sample.SampleRequestV2 request) {
return blockingUnaryCall(
getChannel(), getGetSampleV2MethodHelper(), getCallOptions(), request);
}
}
/**
*/
public static final class SampleServiceV2FutureStub extends io.grpc.stub.AbstractStub {
private SampleServiceV2FutureStub(io.grpc.Channel channel) {
super(channel);
}
private SampleServiceV2FutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SampleServiceV2FutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SampleServiceV2FutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture getSampleV2(
net.spals.appbuilder.app.examples.grpc.sample.SampleRequestV2 request) {
return futureUnaryCall(
getChannel().newCall(getGetSampleV2MethodHelper(), getCallOptions()), request);
}
}
private static final int METHODID_GET_SAMPLE_V2 = 0;
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 SampleServiceV2ImplBase serviceImpl;
private final int methodId;
MethodHandlers(SampleServiceV2ImplBase 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_SAMPLE_V2:
serviceImpl.getSampleV2((net.spals.appbuilder.app.examples.grpc.sample.SampleRequestV2) 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();
}
}
}
private static abstract class SampleServiceV2BaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
SampleServiceV2BaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return net.spals.appbuilder.app.examples.grpc.sample.SampleServerV2Proto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("SampleServiceV2");
}
}
private static final class SampleServiceV2FileDescriptorSupplier
extends SampleServiceV2BaseDescriptorSupplier {
SampleServiceV2FileDescriptorSupplier() {}
}
private static final class SampleServiceV2MethodDescriptorSupplier
extends SampleServiceV2BaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
SampleServiceV2MethodDescriptorSupplier(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 (SampleServiceV2Grpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new SampleServiceV2FileDescriptorSupplier())
.addMethod(getGetSampleV2MethodHelper())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy