xyz.block.ftl.v1.ModuleServiceGrpc Maven / Gradle / Ivy
The newest version!
package xyz.block.ftl.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* ModuleService is the service that modules use to interact with the Controller.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.65.1)",
comments = "Source: xyz/block/ftl/v1/ftl.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ModuleServiceGrpc {
private ModuleServiceGrpc() {}
public static final java.lang.String SERVICE_NAME = "xyz.block.ftl.v1.ModuleService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getPingMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Ping",
requestType = xyz.block.ftl.v1.PingRequest.class,
responseType = xyz.block.ftl.v1.PingResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getPingMethod() {
io.grpc.MethodDescriptor getPingMethod;
if ((getPingMethod = ModuleServiceGrpc.getPingMethod) == null) {
synchronized (ModuleServiceGrpc.class) {
if ((getPingMethod = ModuleServiceGrpc.getPingMethod) == null) {
ModuleServiceGrpc.getPingMethod = getPingMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Ping"))
.setSafe(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.PingRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.PingResponse.getDefaultInstance()))
.setSchemaDescriptor(new ModuleServiceMethodDescriptorSupplier("Ping"))
.build();
}
}
}
return getPingMethod;
}
private static volatile io.grpc.MethodDescriptor getGetModuleContextMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetModuleContext",
requestType = xyz.block.ftl.v1.ModuleContextRequest.class,
responseType = xyz.block.ftl.v1.ModuleContextResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getGetModuleContextMethod() {
io.grpc.MethodDescriptor getGetModuleContextMethod;
if ((getGetModuleContextMethod = ModuleServiceGrpc.getGetModuleContextMethod) == null) {
synchronized (ModuleServiceGrpc.class) {
if ((getGetModuleContextMethod = ModuleServiceGrpc.getGetModuleContextMethod) == null) {
ModuleServiceGrpc.getGetModuleContextMethod = getGetModuleContextMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetModuleContext"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.ModuleContextRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.ModuleContextResponse.getDefaultInstance()))
.setSchemaDescriptor(new ModuleServiceMethodDescriptorSupplier("GetModuleContext"))
.build();
}
}
}
return getGetModuleContextMethod;
}
private static volatile io.grpc.MethodDescriptor getAcquireLeaseMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "AcquireLease",
requestType = xyz.block.ftl.v1.AcquireLeaseRequest.class,
responseType = xyz.block.ftl.v1.AcquireLeaseResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getAcquireLeaseMethod() {
io.grpc.MethodDescriptor getAcquireLeaseMethod;
if ((getAcquireLeaseMethod = ModuleServiceGrpc.getAcquireLeaseMethod) == null) {
synchronized (ModuleServiceGrpc.class) {
if ((getAcquireLeaseMethod = ModuleServiceGrpc.getAcquireLeaseMethod) == null) {
ModuleServiceGrpc.getAcquireLeaseMethod = getAcquireLeaseMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "AcquireLease"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.AcquireLeaseRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.AcquireLeaseResponse.getDefaultInstance()))
.setSchemaDescriptor(new ModuleServiceMethodDescriptorSupplier("AcquireLease"))
.build();
}
}
}
return getAcquireLeaseMethod;
}
private static volatile io.grpc.MethodDescriptor getSendFSMEventMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "SendFSMEvent",
requestType = xyz.block.ftl.v1.SendFSMEventRequest.class,
responseType = xyz.block.ftl.v1.SendFSMEventResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getSendFSMEventMethod() {
io.grpc.MethodDescriptor getSendFSMEventMethod;
if ((getSendFSMEventMethod = ModuleServiceGrpc.getSendFSMEventMethod) == null) {
synchronized (ModuleServiceGrpc.class) {
if ((getSendFSMEventMethod = ModuleServiceGrpc.getSendFSMEventMethod) == null) {
ModuleServiceGrpc.getSendFSMEventMethod = getSendFSMEventMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SendFSMEvent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.SendFSMEventRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.SendFSMEventResponse.getDefaultInstance()))
.setSchemaDescriptor(new ModuleServiceMethodDescriptorSupplier("SendFSMEvent"))
.build();
}
}
}
return getSendFSMEventMethod;
}
private static volatile io.grpc.MethodDescriptor getSetNextFSMEventMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "SetNextFSMEvent",
requestType = xyz.block.ftl.v1.SendFSMEventRequest.class,
responseType = xyz.block.ftl.v1.SendFSMEventResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getSetNextFSMEventMethod() {
io.grpc.MethodDescriptor getSetNextFSMEventMethod;
if ((getSetNextFSMEventMethod = ModuleServiceGrpc.getSetNextFSMEventMethod) == null) {
synchronized (ModuleServiceGrpc.class) {
if ((getSetNextFSMEventMethod = ModuleServiceGrpc.getSetNextFSMEventMethod) == null) {
ModuleServiceGrpc.getSetNextFSMEventMethod = getSetNextFSMEventMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetNextFSMEvent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.SendFSMEventRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.SendFSMEventResponse.getDefaultInstance()))
.setSchemaDescriptor(new ModuleServiceMethodDescriptorSupplier("SetNextFSMEvent"))
.build();
}
}
}
return getSetNextFSMEventMethod;
}
private static volatile io.grpc.MethodDescriptor getPublishEventMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "PublishEvent",
requestType = xyz.block.ftl.v1.PublishEventRequest.class,
responseType = xyz.block.ftl.v1.PublishEventResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getPublishEventMethod() {
io.grpc.MethodDescriptor getPublishEventMethod;
if ((getPublishEventMethod = ModuleServiceGrpc.getPublishEventMethod) == null) {
synchronized (ModuleServiceGrpc.class) {
if ((getPublishEventMethod = ModuleServiceGrpc.getPublishEventMethod) == null) {
ModuleServiceGrpc.getPublishEventMethod = getPublishEventMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "PublishEvent"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.PublishEventRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
xyz.block.ftl.v1.PublishEventResponse.getDefaultInstance()))
.setSchemaDescriptor(new ModuleServiceMethodDescriptorSupplier("PublishEvent"))
.build();
}
}
}
return getPublishEventMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ModuleServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ModuleServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ModuleServiceStub(channel, callOptions);
}
};
return ModuleServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ModuleServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ModuleServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ModuleServiceBlockingStub(channel, callOptions);
}
};
return ModuleServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ModuleServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ModuleServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ModuleServiceFutureStub(channel, callOptions);
}
};
return ModuleServiceFutureStub.newStub(factory, channel);
}
/**
*
* ModuleService is the service that modules use to interact with the Controller.
*
*/
public interface AsyncService {
/**
*
* Ping service for readiness.
*
*/
default void ping(xyz.block.ftl.v1.PingRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPingMethod(), responseObserver);
}
/**
*
* Get configuration state for the module
*
*/
default void getModuleContext(xyz.block.ftl.v1.ModuleContextRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetModuleContextMethod(), responseObserver);
}
/**
*
* Acquire (and renew) a lease for a deployment.
* Returns ResourceExhausted if the lease is held.
*
*/
default io.grpc.stub.StreamObserver acquireLease(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getAcquireLeaseMethod(), responseObserver);
}
/**
*
* Send an event to an FSM.
*
*/
default void sendFSMEvent(xyz.block.ftl.v1.SendFSMEventRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSendFSMEventMethod(), responseObserver);
}
/**
*
* Set the next event for an FSM.
*
*/
default void setNextFSMEvent(xyz.block.ftl.v1.SendFSMEventRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetNextFSMEventMethod(), responseObserver);
}
/**
*
* Publish an event to a topic.
*
*/
default void publishEvent(xyz.block.ftl.v1.PublishEventRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPublishEventMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service ModuleService.
*
* ModuleService is the service that modules use to interact with the Controller.
*
*/
public static abstract class ModuleServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return ModuleServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service ModuleService.
*
* ModuleService is the service that modules use to interact with the Controller.
*
*/
public static final class ModuleServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private ModuleServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ModuleServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ModuleServiceStub(channel, callOptions);
}
/**
*
* Ping service for readiness.
*
*/
public void ping(xyz.block.ftl.v1.PingRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getPingMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Get configuration state for the module
*
*/
public void getModuleContext(xyz.block.ftl.v1.ModuleContextRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getGetModuleContextMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Acquire (and renew) a lease for a deployment.
* Returns ResourceExhausted if the lease is held.
*
*/
public io.grpc.stub.StreamObserver acquireLease(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getAcquireLeaseMethod(), getCallOptions()), responseObserver);
}
/**
*
* Send an event to an FSM.
*
*/
public void sendFSMEvent(xyz.block.ftl.v1.SendFSMEventRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getSendFSMEventMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Set the next event for an FSM.
*
*/
public void setNextFSMEvent(xyz.block.ftl.v1.SendFSMEventRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getSetNextFSMEventMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Publish an event to a topic.
*
*/
public void publishEvent(xyz.block.ftl.v1.PublishEventRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getPublishEventMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service ModuleService.
*
* ModuleService is the service that modules use to interact with the Controller.
*
*/
public static final class ModuleServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private ModuleServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ModuleServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ModuleServiceBlockingStub(channel, callOptions);
}
/**
*
* Ping service for readiness.
*
*/
public xyz.block.ftl.v1.PingResponse ping(xyz.block.ftl.v1.PingRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getPingMethod(), getCallOptions(), request);
}
/**
*
* Get configuration state for the module
*
*/
public java.util.Iterator getModuleContext(
xyz.block.ftl.v1.ModuleContextRequest request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getGetModuleContextMethod(), getCallOptions(), request);
}
/**
*
* Send an event to an FSM.
*
*/
public xyz.block.ftl.v1.SendFSMEventResponse sendFSMEvent(xyz.block.ftl.v1.SendFSMEventRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getSendFSMEventMethod(), getCallOptions(), request);
}
/**
*
* Set the next event for an FSM.
*
*/
public xyz.block.ftl.v1.SendFSMEventResponse setNextFSMEvent(xyz.block.ftl.v1.SendFSMEventRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getSetNextFSMEventMethod(), getCallOptions(), request);
}
/**
*
* Publish an event to a topic.
*
*/
public xyz.block.ftl.v1.PublishEventResponse publishEvent(xyz.block.ftl.v1.PublishEventRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getPublishEventMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service ModuleService.
*
* ModuleService is the service that modules use to interact with the Controller.
*
*/
public static final class ModuleServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private ModuleServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ModuleServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ModuleServiceFutureStub(channel, callOptions);
}
/**
*
* Ping service for readiness.
*
*/
public com.google.common.util.concurrent.ListenableFuture ping(
xyz.block.ftl.v1.PingRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getPingMethod(), getCallOptions()), request);
}
/**
*
* Send an event to an FSM.
*
*/
public com.google.common.util.concurrent.ListenableFuture sendFSMEvent(
xyz.block.ftl.v1.SendFSMEventRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSendFSMEventMethod(), getCallOptions()), request);
}
/**
*
* Set the next event for an FSM.
*
*/
public com.google.common.util.concurrent.ListenableFuture setNextFSMEvent(
xyz.block.ftl.v1.SendFSMEventRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSetNextFSMEventMethod(), getCallOptions()), request);
}
/**
*
* Publish an event to a topic.
*
*/
public com.google.common.util.concurrent.ListenableFuture publishEvent(
xyz.block.ftl.v1.PublishEventRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getPublishEventMethod(), getCallOptions()), request);
}
}
private static final int METHODID_PING = 0;
private static final int METHODID_GET_MODULE_CONTEXT = 1;
private static final int METHODID_SEND_FSMEVENT = 2;
private static final int METHODID_SET_NEXT_FSMEVENT = 3;
private static final int METHODID_PUBLISH_EVENT = 4;
private static final int METHODID_ACQUIRE_LEASE = 5;
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_PING:
serviceImpl.ping((xyz.block.ftl.v1.PingRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_MODULE_CONTEXT:
serviceImpl.getModuleContext((xyz.block.ftl.v1.ModuleContextRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_SEND_FSMEVENT:
serviceImpl.sendFSMEvent((xyz.block.ftl.v1.SendFSMEventRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_SET_NEXT_FSMEVENT:
serviceImpl.setNextFSMEvent((xyz.block.ftl.v1.SendFSMEventRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_PUBLISH_EVENT:
serviceImpl.publishEvent((xyz.block.ftl.v1.PublishEventRequest) 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_ACQUIRE_LEASE:
return (io.grpc.stub.StreamObserver) serviceImpl.acquireLease(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getPingMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
xyz.block.ftl.v1.PingRequest,
xyz.block.ftl.v1.PingResponse>(
service, METHODID_PING)))
.addMethod(
getGetModuleContextMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
xyz.block.ftl.v1.ModuleContextRequest,
xyz.block.ftl.v1.ModuleContextResponse>(
service, METHODID_GET_MODULE_CONTEXT)))
.addMethod(
getAcquireLeaseMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
xyz.block.ftl.v1.AcquireLeaseRequest,
xyz.block.ftl.v1.AcquireLeaseResponse>(
service, METHODID_ACQUIRE_LEASE)))
.addMethod(
getSendFSMEventMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
xyz.block.ftl.v1.SendFSMEventRequest,
xyz.block.ftl.v1.SendFSMEventResponse>(
service, METHODID_SEND_FSMEVENT)))
.addMethod(
getSetNextFSMEventMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
xyz.block.ftl.v1.SendFSMEventRequest,
xyz.block.ftl.v1.SendFSMEventResponse>(
service, METHODID_SET_NEXT_FSMEVENT)))
.addMethod(
getPublishEventMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
xyz.block.ftl.v1.PublishEventRequest,
xyz.block.ftl.v1.PublishEventResponse>(
service, METHODID_PUBLISH_EVENT)))
.build();
}
private static abstract class ModuleServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ModuleServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return xyz.block.ftl.v1.Ftl.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("ModuleService");
}
}
private static final class ModuleServiceFileDescriptorSupplier
extends ModuleServiceBaseDescriptorSupplier {
ModuleServiceFileDescriptorSupplier() {}
}
private static final class ModuleServiceMethodDescriptorSupplier
extends ModuleServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
ModuleServiceMethodDescriptorSupplier(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 (ModuleServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ModuleServiceFileDescriptorSupplier())
.addMethod(getPingMethod())
.addMethod(getGetModuleContextMethod())
.addMethod(getAcquireLeaseMethod())
.addMethod(getSendFSMEventMethod())
.addMethod(getSetNextFSMEventMethod())
.addMethod(getPublishEventMethod())
.build();
}
}
}
return result;
}
}