com.vesoft.nebula.proto.graph.GraphServiceGrpc Maven / Gradle / Ivy
The newest version!
package com.vesoft.nebula.proto.graph;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* Interface definition
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.60.0)",
comments = "Source: graph.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class GraphServiceGrpc {
private GraphServiceGrpc() {}
public static final java.lang.String SERVICE_NAME = "nebula.proto.graph.GraphService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getAuthenticateMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Authenticate",
requestType = com.vesoft.nebula.proto.graph.AuthRequest.class,
responseType = com.vesoft.nebula.proto.graph.AuthResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getAuthenticateMethod() {
io.grpc.MethodDescriptor getAuthenticateMethod;
if ((getAuthenticateMethod = GraphServiceGrpc.getAuthenticateMethod) == null) {
synchronized (GraphServiceGrpc.class) {
if ((getAuthenticateMethod = GraphServiceGrpc.getAuthenticateMethod) == null) {
GraphServiceGrpc.getAuthenticateMethod = getAuthenticateMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Authenticate"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.vesoft.nebula.proto.graph.AuthRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.vesoft.nebula.proto.graph.AuthResponse.getDefaultInstance()))
.setSchemaDescriptor(new GraphServiceMethodDescriptorSupplier("Authenticate"))
.build();
}
}
}
return getAuthenticateMethod;
}
private static volatile io.grpc.MethodDescriptor getExecuteMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Execute",
requestType = com.vesoft.nebula.proto.graph.ExecuteRequest.class,
responseType = com.vesoft.nebula.proto.graph.ExecuteResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getExecuteMethod() {
io.grpc.MethodDescriptor getExecuteMethod;
if ((getExecuteMethod = GraphServiceGrpc.getExecuteMethod) == null) {
synchronized (GraphServiceGrpc.class) {
if ((getExecuteMethod = GraphServiceGrpc.getExecuteMethod) == null) {
GraphServiceGrpc.getExecuteMethod = getExecuteMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Execute"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.vesoft.nebula.proto.graph.ExecuteRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.vesoft.nebula.proto.graph.ExecuteResponse.getDefaultInstance()))
.setSchemaDescriptor(new GraphServiceMethodDescriptorSupplier("Execute"))
.build();
}
}
}
return getExecuteMethod;
}
private static volatile io.grpc.MethodDescriptor getStreamingExecuteMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "StreamingExecute",
requestType = com.vesoft.nebula.proto.graph.ExecuteRequest.class,
responseType = com.vesoft.nebula.proto.graph.ExecuteResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getStreamingExecuteMethod() {
io.grpc.MethodDescriptor getStreamingExecuteMethod;
if ((getStreamingExecuteMethod = GraphServiceGrpc.getStreamingExecuteMethod) == null) {
synchronized (GraphServiceGrpc.class) {
if ((getStreamingExecuteMethod = GraphServiceGrpc.getStreamingExecuteMethod) == null) {
GraphServiceGrpc.getStreamingExecuteMethod = getStreamingExecuteMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamingExecute"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.vesoft.nebula.proto.graph.ExecuteRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.vesoft.nebula.proto.graph.ExecuteResponse.getDefaultInstance()))
.setSchemaDescriptor(new GraphServiceMethodDescriptorSupplier("StreamingExecute"))
.build();
}
}
}
return getStreamingExecuteMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static GraphServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public GraphServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GraphServiceStub(channel, callOptions);
}
};
return GraphServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static GraphServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public GraphServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GraphServiceBlockingStub(channel, callOptions);
}
};
return GraphServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static GraphServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public GraphServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GraphServiceFutureStub(channel, callOptions);
}
};
return GraphServiceFutureStub.newStub(factory, channel);
}
/**
*
* Interface definition
*
*/
public interface AsyncService {
/**
*/
default void authenticate(com.vesoft.nebula.proto.graph.AuthRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAuthenticateMethod(), responseObserver);
}
/**
*/
default void execute(com.vesoft.nebula.proto.graph.ExecuteRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExecuteMethod(), responseObserver);
}
/**
*/
default void streamingExecute(com.vesoft.nebula.proto.graph.ExecuteRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStreamingExecuteMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service GraphService.
*
* Interface definition
*
*/
public static abstract class GraphServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return GraphServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service GraphService.
*
* Interface definition
*
*/
public static final class GraphServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private GraphServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GraphServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GraphServiceStub(channel, callOptions);
}
/**
*/
public void authenticate(com.vesoft.nebula.proto.graph.AuthRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getAuthenticateMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void execute(com.vesoft.nebula.proto.graph.ExecuteRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getExecuteMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void streamingExecute(com.vesoft.nebula.proto.graph.ExecuteRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getStreamingExecuteMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service GraphService.
*
* Interface definition
*
*/
public static final class GraphServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private GraphServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GraphServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GraphServiceBlockingStub(channel, callOptions);
}
/**
*/
public com.vesoft.nebula.proto.graph.AuthResponse authenticate(com.vesoft.nebula.proto.graph.AuthRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getAuthenticateMethod(), getCallOptions(), request);
}
/**
*/
public com.vesoft.nebula.proto.graph.ExecuteResponse execute(com.vesoft.nebula.proto.graph.ExecuteRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getExecuteMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator streamingExecute(
com.vesoft.nebula.proto.graph.ExecuteRequest request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getStreamingExecuteMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service GraphService.
*
* Interface definition
*
*/
public static final class GraphServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private GraphServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GraphServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GraphServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture authenticate(
com.vesoft.nebula.proto.graph.AuthRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getAuthenticateMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture execute(
com.vesoft.nebula.proto.graph.ExecuteRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getExecuteMethod(), getCallOptions()), request);
}
}
private static final int METHODID_AUTHENTICATE = 0;
private static final int METHODID_EXECUTE = 1;
private static final int METHODID_STREAMING_EXECUTE = 2;
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 AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService 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_AUTHENTICATE:
serviceImpl.authenticate((com.vesoft.nebula.proto.graph.AuthRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_EXECUTE:
serviceImpl.execute((com.vesoft.nebula.proto.graph.ExecuteRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_STREAMING_EXECUTE:
serviceImpl.streamingExecute((com.vesoft.nebula.proto.graph.ExecuteRequest) 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 final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getAuthenticateMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.vesoft.nebula.proto.graph.AuthRequest,
com.vesoft.nebula.proto.graph.AuthResponse>(
service, METHODID_AUTHENTICATE)))
.addMethod(
getExecuteMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.vesoft.nebula.proto.graph.ExecuteRequest,
com.vesoft.nebula.proto.graph.ExecuteResponse>(
service, METHODID_EXECUTE)))
.addMethod(
getStreamingExecuteMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
com.vesoft.nebula.proto.graph.ExecuteRequest,
com.vesoft.nebula.proto.graph.ExecuteResponse>(
service, METHODID_STREAMING_EXECUTE)))
.build();
}
private static abstract class GraphServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
GraphServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.vesoft.nebula.proto.graph.Graph.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("GraphService");
}
}
private static final class GraphServiceFileDescriptorSupplier
extends GraphServiceBaseDescriptorSupplier {
GraphServiceFileDescriptorSupplier() {}
}
private static final class GraphServiceMethodDescriptorSupplier
extends GraphServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
GraphServiceMethodDescriptorSupplier(java.lang.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 (GraphServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new GraphServiceFileDescriptorSupplier())
.addMethod(getAuthenticateMethod())
.addMethod(getExecuteMethod())
.addMethod(getStreamingExecuteMethod())
.build();
}
}
}
return result;
}
}