All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.axoniq.axonserver.grpc.event.EventSchedulerGrpc Maven / Gradle / Ivy

package io.axoniq.axonserver.grpc.event;

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;

/**
 * 
 * Service to use AxonServer as a provider of an EventScheduler 
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.19.0)", comments = "Source: event.proto") public final class EventSchedulerGrpc { private EventSchedulerGrpc() {} public static final String SERVICE_NAME = "io.axoniq.axonserver.grpc.event.EventScheduler"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getScheduleEventMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ScheduleEvent", requestType = io.axoniq.axonserver.grpc.event.ScheduleEventRequest.class, responseType = io.axoniq.axonserver.grpc.event.ScheduleToken.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getScheduleEventMethod() { io.grpc.MethodDescriptor getScheduleEventMethod; if ((getScheduleEventMethod = EventSchedulerGrpc.getScheduleEventMethod) == null) { synchronized (EventSchedulerGrpc.class) { if ((getScheduleEventMethod = EventSchedulerGrpc.getScheduleEventMethod) == null) { EventSchedulerGrpc.getScheduleEventMethod = getScheduleEventMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "io.axoniq.axonserver.grpc.event.EventScheduler", "ScheduleEvent")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.axoniq.axonserver.grpc.event.ScheduleEventRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.axoniq.axonserver.grpc.event.ScheduleToken.getDefaultInstance())) .setSchemaDescriptor(new EventSchedulerMethodDescriptorSupplier("ScheduleEvent")) .build(); } } } return getScheduleEventMethod; } private static volatile io.grpc.MethodDescriptor getRescheduleEventMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "RescheduleEvent", requestType = io.axoniq.axonserver.grpc.event.RescheduleEventRequest.class, responseType = io.axoniq.axonserver.grpc.event.ScheduleToken.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getRescheduleEventMethod() { io.grpc.MethodDescriptor getRescheduleEventMethod; if ((getRescheduleEventMethod = EventSchedulerGrpc.getRescheduleEventMethod) == null) { synchronized (EventSchedulerGrpc.class) { if ((getRescheduleEventMethod = EventSchedulerGrpc.getRescheduleEventMethod) == null) { EventSchedulerGrpc.getRescheduleEventMethod = getRescheduleEventMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "io.axoniq.axonserver.grpc.event.EventScheduler", "RescheduleEvent")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.axoniq.axonserver.grpc.event.RescheduleEventRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.axoniq.axonserver.grpc.event.ScheduleToken.getDefaultInstance())) .setSchemaDescriptor(new EventSchedulerMethodDescriptorSupplier("RescheduleEvent")) .build(); } } } return getRescheduleEventMethod; } private static volatile io.grpc.MethodDescriptor getCancelScheduledEventMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "CancelScheduledEvent", requestType = io.axoniq.axonserver.grpc.event.CancelScheduledEventRequest.class, responseType = io.axoniq.axonserver.grpc.InstructionAck.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getCancelScheduledEventMethod() { io.grpc.MethodDescriptor getCancelScheduledEventMethod; if ((getCancelScheduledEventMethod = EventSchedulerGrpc.getCancelScheduledEventMethod) == null) { synchronized (EventSchedulerGrpc.class) { if ((getCancelScheduledEventMethod = EventSchedulerGrpc.getCancelScheduledEventMethod) == null) { EventSchedulerGrpc.getCancelScheduledEventMethod = getCancelScheduledEventMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "io.axoniq.axonserver.grpc.event.EventScheduler", "CancelScheduledEvent")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.axoniq.axonserver.grpc.event.CancelScheduledEventRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.axoniq.axonserver.grpc.InstructionAck.getDefaultInstance())) .setSchemaDescriptor(new EventSchedulerMethodDescriptorSupplier("CancelScheduledEvent")) .build(); } } } return getCancelScheduledEventMethod; } /** * Creates a new async stub that supports all call types for the service */ public static EventSchedulerStub newStub(io.grpc.Channel channel) { return new EventSchedulerStub(channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static EventSchedulerBlockingStub newBlockingStub( io.grpc.Channel channel) { return new EventSchedulerBlockingStub(channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static EventSchedulerFutureStub newFutureStub( io.grpc.Channel channel) { return new EventSchedulerFutureStub(channel); } /** *
   * Service to use AxonServer as a provider of an EventScheduler 
   * 
*/ public static abstract class EventSchedulerImplBase implements io.grpc.BindableService { /** *
     *  Schedule the given event for publication at the given time}. The returned ScheduleToken can be used to cancel the planned publication.
     * 
*/ public void scheduleEvent(io.axoniq.axonserver.grpc.event.ScheduleEventRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getScheduleEventMethod(), responseObserver); } /** *
     *  Cancel a scheduled event and schedule another in its place.
     * 
*/ public void rescheduleEvent(io.axoniq.axonserver.grpc.event.RescheduleEventRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getRescheduleEventMethod(), responseObserver); } /** *
     *  Cancel the publication of a scheduled event. If the events has already been published, this method does nothing.
     * 
*/ public void cancelScheduledEvent(io.axoniq.axonserver.grpc.event.CancelScheduledEventRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getCancelScheduledEventMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getScheduleEventMethod(), asyncUnaryCall( new MethodHandlers< io.axoniq.axonserver.grpc.event.ScheduleEventRequest, io.axoniq.axonserver.grpc.event.ScheduleToken>( this, METHODID_SCHEDULE_EVENT))) .addMethod( getRescheduleEventMethod(), asyncUnaryCall( new MethodHandlers< io.axoniq.axonserver.grpc.event.RescheduleEventRequest, io.axoniq.axonserver.grpc.event.ScheduleToken>( this, METHODID_RESCHEDULE_EVENT))) .addMethod( getCancelScheduledEventMethod(), asyncUnaryCall( new MethodHandlers< io.axoniq.axonserver.grpc.event.CancelScheduledEventRequest, io.axoniq.axonserver.grpc.InstructionAck>( this, METHODID_CANCEL_SCHEDULED_EVENT))) .build(); } } /** *
   * Service to use AxonServer as a provider of an EventScheduler 
   * 
*/ public static final class EventSchedulerStub extends io.grpc.stub.AbstractStub { private EventSchedulerStub(io.grpc.Channel channel) { super(channel); } private EventSchedulerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected EventSchedulerStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EventSchedulerStub(channel, callOptions); } /** *
     *  Schedule the given event for publication at the given time}. The returned ScheduleToken can be used to cancel the planned publication.
     * 
*/ public void scheduleEvent(io.axoniq.axonserver.grpc.event.ScheduleEventRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getScheduleEventMethod(), getCallOptions()), request, responseObserver); } /** *
     *  Cancel a scheduled event and schedule another in its place.
     * 
*/ public void rescheduleEvent(io.axoniq.axonserver.grpc.event.RescheduleEventRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getRescheduleEventMethod(), getCallOptions()), request, responseObserver); } /** *
     *  Cancel the publication of a scheduled event. If the events has already been published, this method does nothing.
     * 
*/ public void cancelScheduledEvent(io.axoniq.axonserver.grpc.event.CancelScheduledEventRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getCancelScheduledEventMethod(), getCallOptions()), request, responseObserver); } } /** *
   * Service to use AxonServer as a provider of an EventScheduler 
   * 
*/ public static final class EventSchedulerBlockingStub extends io.grpc.stub.AbstractStub { private EventSchedulerBlockingStub(io.grpc.Channel channel) { super(channel); } private EventSchedulerBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected EventSchedulerBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EventSchedulerBlockingStub(channel, callOptions); } /** *
     *  Schedule the given event for publication at the given time}. The returned ScheduleToken can be used to cancel the planned publication.
     * 
*/ public io.axoniq.axonserver.grpc.event.ScheduleToken scheduleEvent(io.axoniq.axonserver.grpc.event.ScheduleEventRequest request) { return blockingUnaryCall( getChannel(), getScheduleEventMethod(), getCallOptions(), request); } /** *
     *  Cancel a scheduled event and schedule another in its place.
     * 
*/ public io.axoniq.axonserver.grpc.event.ScheduleToken rescheduleEvent(io.axoniq.axonserver.grpc.event.RescheduleEventRequest request) { return blockingUnaryCall( getChannel(), getRescheduleEventMethod(), getCallOptions(), request); } /** *
     *  Cancel the publication of a scheduled event. If the events has already been published, this method does nothing.
     * 
*/ public io.axoniq.axonserver.grpc.InstructionAck cancelScheduledEvent(io.axoniq.axonserver.grpc.event.CancelScheduledEventRequest request) { return blockingUnaryCall( getChannel(), getCancelScheduledEventMethod(), getCallOptions(), request); } } /** *
   * Service to use AxonServer as a provider of an EventScheduler 
   * 
*/ public static final class EventSchedulerFutureStub extends io.grpc.stub.AbstractStub { private EventSchedulerFutureStub(io.grpc.Channel channel) { super(channel); } private EventSchedulerFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected EventSchedulerFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EventSchedulerFutureStub(channel, callOptions); } /** *
     *  Schedule the given event for publication at the given time}. The returned ScheduleToken can be used to cancel the planned publication.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture scheduleEvent( io.axoniq.axonserver.grpc.event.ScheduleEventRequest request) { return futureUnaryCall( getChannel().newCall(getScheduleEventMethod(), getCallOptions()), request); } /** *
     *  Cancel a scheduled event and schedule another in its place.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture rescheduleEvent( io.axoniq.axonserver.grpc.event.RescheduleEventRequest request) { return futureUnaryCall( getChannel().newCall(getRescheduleEventMethod(), getCallOptions()), request); } /** *
     *  Cancel the publication of a scheduled event. If the events has already been published, this method does nothing.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture cancelScheduledEvent( io.axoniq.axonserver.grpc.event.CancelScheduledEventRequest request) { return futureUnaryCall( getChannel().newCall(getCancelScheduledEventMethod(), getCallOptions()), request); } } private static final int METHODID_SCHEDULE_EVENT = 0; private static final int METHODID_RESCHEDULE_EVENT = 1; private static final int METHODID_CANCEL_SCHEDULED_EVENT = 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 EventSchedulerImplBase serviceImpl; private final int methodId; MethodHandlers(EventSchedulerImplBase 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_SCHEDULE_EVENT: serviceImpl.scheduleEvent((io.axoniq.axonserver.grpc.event.ScheduleEventRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_RESCHEDULE_EVENT: serviceImpl.rescheduleEvent((io.axoniq.axonserver.grpc.event.RescheduleEventRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_CANCEL_SCHEDULED_EVENT: serviceImpl.cancelScheduledEvent((io.axoniq.axonserver.grpc.event.CancelScheduledEventRequest) 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 EventSchedulerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { EventSchedulerBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.axoniq.axonserver.grpc.event.EventOuterClass.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("EventScheduler"); } } private static final class EventSchedulerFileDescriptorSupplier extends EventSchedulerBaseDescriptorSupplier { EventSchedulerFileDescriptorSupplier() {} } private static final class EventSchedulerMethodDescriptorSupplier extends EventSchedulerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; EventSchedulerMethodDescriptorSupplier(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 (EventSchedulerGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new EventSchedulerFileDescriptorSupplier()) .addMethod(getScheduleEventMethod()) .addMethod(getRescheduleEventMethod()) .addMethod(getCancelScheduledEventMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy