
ai.grakn.rpc.proto.SessionServiceGrpc Maven / Gradle / Ivy
The newest version!
package ai.grakn.rpc.proto;
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;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.2.0)",
comments = "Source: Session.proto")
public final class SessionServiceGrpc {
private SessionServiceGrpc() {}
public static final String SERVICE_NAME = "session.SessionService";
// 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_TRANSACTION =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
generateFullMethodName(
"session.SessionService", "transaction"),
io.grpc.protobuf.ProtoUtils.marshaller(ai.grakn.rpc.proto.SessionProto.Transaction.Req.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(ai.grakn.rpc.proto.SessionProto.Transaction.Res.getDefaultInstance()));
/**
* Creates a new async stub that supports all call types for the service
*/
public static SessionServiceStub newStub(io.grpc.Channel channel) {
return new SessionServiceStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static SessionServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new SessionServiceBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
*/
public static SessionServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
return new SessionServiceFutureStub(channel);
}
/**
*/
public static abstract class SessionServiceImplBase implements io.grpc.BindableService {
/**
*
* Represents a full transaction. The stream of `Transaction.Req`s must begin with a `Open` message.
* When the call is completed, the transaction will always be closed, with or without a `Commit` message.
*
*/
public io.grpc.stub.StreamObserver transaction(
io.grpc.stub.StreamObserver responseObserver) {
return asyncUnimplementedStreamingCall(METHOD_TRANSACTION, responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_TRANSACTION,
asyncBidiStreamingCall(
new MethodHandlers<
ai.grakn.rpc.proto.SessionProto.Transaction.Req,
ai.grakn.rpc.proto.SessionProto.Transaction.Res>(
this, METHODID_TRANSACTION)))
.build();
}
}
/**
*/
public static final class SessionServiceStub extends io.grpc.stub.AbstractStub {
private SessionServiceStub(io.grpc.Channel channel) {
super(channel);
}
private SessionServiceStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SessionServiceStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SessionServiceStub(channel, callOptions);
}
/**
*
* Represents a full transaction. The stream of `Transaction.Req`s must begin with a `Open` message.
* When the call is completed, the transaction will always be closed, with or without a `Commit` message.
*
*/
public io.grpc.stub.StreamObserver transaction(
io.grpc.stub.StreamObserver responseObserver) {
return asyncBidiStreamingCall(
getChannel().newCall(METHOD_TRANSACTION, getCallOptions()), responseObserver);
}
}
/**
*/
public static final class SessionServiceBlockingStub extends io.grpc.stub.AbstractStub {
private SessionServiceBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private SessionServiceBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SessionServiceBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SessionServiceBlockingStub(channel, callOptions);
}
}
/**
*/
public static final class SessionServiceFutureStub extends io.grpc.stub.AbstractStub {
private SessionServiceFutureStub(io.grpc.Channel channel) {
super(channel);
}
private SessionServiceFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected SessionServiceFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new SessionServiceFutureStub(channel, callOptions);
}
}
private static final int METHODID_TRANSACTION = 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 SessionServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(SessionServiceImplBase 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) {
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_TRANSACTION:
return (io.grpc.stub.StreamObserver) serviceImpl.transaction(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
private static final class SessionServiceDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return ai.grakn.rpc.proto.SessionProto.getDescriptor();
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (SessionServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new SessionServiceDescriptorSupplier())
.addMethod(METHOD_TRANSACTION)
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy