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

org.finos.tracdap.api.internal.TracRuntimeApiGrpc Maven / Gradle / Ivy

package org.finos.tracdap.api.internal;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.68.0)",
    comments = "Source: tracdap/api/internal/runtime.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class TracRuntimeApiGrpc {

  private TracRuntimeApiGrpc() {}

  public static final java.lang.String SERVICE_NAME = "tracdap.api.internal.TracRuntimeApi";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor getListJobsMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "listJobs",
      requestType = org.finos.tracdap.api.internal.RuntimeListJobsRequest.class,
      responseType = org.finos.tracdap.api.internal.RuntimeListJobsResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getListJobsMethod() {
    io.grpc.MethodDescriptor getListJobsMethod;
    if ((getListJobsMethod = TracRuntimeApiGrpc.getListJobsMethod) == null) {
      synchronized (TracRuntimeApiGrpc.class) {
        if ((getListJobsMethod = TracRuntimeApiGrpc.getListJobsMethod) == null) {
          TracRuntimeApiGrpc.getListJobsMethod = getListJobsMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "listJobs"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.RuntimeListJobsRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.RuntimeListJobsResponse.getDefaultInstance()))
              .setSchemaDescriptor(new TracRuntimeApiMethodDescriptorSupplier("listJobs"))
              .build();
        }
      }
    }
    return getListJobsMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetJobStatusMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "getJobStatus",
      requestType = org.finos.tracdap.api.internal.RuntimeJobInfoRequest.class,
      responseType = org.finos.tracdap.api.internal.RuntimeJobStatus.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetJobStatusMethod() {
    io.grpc.MethodDescriptor getGetJobStatusMethod;
    if ((getGetJobStatusMethod = TracRuntimeApiGrpc.getGetJobStatusMethod) == null) {
      synchronized (TracRuntimeApiGrpc.class) {
        if ((getGetJobStatusMethod = TracRuntimeApiGrpc.getGetJobStatusMethod) == null) {
          TracRuntimeApiGrpc.getGetJobStatusMethod = getGetJobStatusMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getJobStatus"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.RuntimeJobInfoRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.RuntimeJobStatus.getDefaultInstance()))
              .setSchemaDescriptor(new TracRuntimeApiMethodDescriptorSupplier("getJobStatus"))
              .build();
        }
      }
    }
    return getGetJobStatusMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetJobResultMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "getJobResult",
      requestType = org.finos.tracdap.api.internal.RuntimeJobInfoRequest.class,
      responseType = org.finos.tracdap.api.internal.RuntimeJobResult.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetJobResultMethod() {
    io.grpc.MethodDescriptor getGetJobResultMethod;
    if ((getGetJobResultMethod = TracRuntimeApiGrpc.getGetJobResultMethod) == null) {
      synchronized (TracRuntimeApiGrpc.class) {
        if ((getGetJobResultMethod = TracRuntimeApiGrpc.getGetJobResultMethod) == null) {
          TracRuntimeApiGrpc.getGetJobResultMethod = getGetJobResultMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getJobResult"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.RuntimeJobInfoRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.finos.tracdap.api.internal.RuntimeJobResult.getDefaultInstance()))
              .setSchemaDescriptor(new TracRuntimeApiMethodDescriptorSupplier("getJobResult"))
              .build();
        }
      }
    }
    return getGetJobResultMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static TracRuntimeApiStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public TracRuntimeApiStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new TracRuntimeApiStub(channel, callOptions);
        }
      };
    return TracRuntimeApiStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static TracRuntimeApiBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public TracRuntimeApiBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new TracRuntimeApiBlockingStub(channel, callOptions);
        }
      };
    return TracRuntimeApiBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static TracRuntimeApiFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public TracRuntimeApiFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new TracRuntimeApiFutureStub(channel, callOptions);
        }
      };
    return TracRuntimeApiFutureStub.newStub(factory, channel);
  }

  /**
   */
  public interface AsyncService {

    /**
     */
    default void listJobs(org.finos.tracdap.api.internal.RuntimeListJobsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListJobsMethod(), responseObserver);
    }

    /**
     */
    default void getJobStatus(org.finos.tracdap.api.internal.RuntimeJobInfoRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetJobStatusMethod(), responseObserver);
    }

    /**
     */
    default void getJobResult(org.finos.tracdap.api.internal.RuntimeJobInfoRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetJobResultMethod(), responseObserver);
    }
  }

  /**
   * Base class for the server implementation of the service TracRuntimeApi.
   */
  public static abstract class TracRuntimeApiImplBase
      implements io.grpc.BindableService, AsyncService {

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return TracRuntimeApiGrpc.bindService(this);
    }
  }

  /**
   * A stub to allow clients to do asynchronous rpc calls to service TracRuntimeApi.
   */
  public static final class TracRuntimeApiStub
      extends io.grpc.stub.AbstractAsyncStub {
    private TracRuntimeApiStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected TracRuntimeApiStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new TracRuntimeApiStub(channel, callOptions);
    }

    /**
     */
    public void listJobs(org.finos.tracdap.api.internal.RuntimeListJobsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getListJobsMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getJobStatus(org.finos.tracdap.api.internal.RuntimeJobInfoRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetJobStatusMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getJobResult(org.finos.tracdap.api.internal.RuntimeJobInfoRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetJobResultMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   * A stub to allow clients to do synchronous rpc calls to service TracRuntimeApi.
   */
  public static final class TracRuntimeApiBlockingStub
      extends io.grpc.stub.AbstractBlockingStub {
    private TracRuntimeApiBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected TracRuntimeApiBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new TracRuntimeApiBlockingStub(channel, callOptions);
    }

    /**
     */
    public org.finos.tracdap.api.internal.RuntimeListJobsResponse listJobs(org.finos.tracdap.api.internal.RuntimeListJobsRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getListJobsMethod(), getCallOptions(), request);
    }

    /**
     */
    public org.finos.tracdap.api.internal.RuntimeJobStatus getJobStatus(org.finos.tracdap.api.internal.RuntimeJobInfoRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetJobStatusMethod(), getCallOptions(), request);
    }

    /**
     */
    public org.finos.tracdap.api.internal.RuntimeJobResult getJobResult(org.finos.tracdap.api.internal.RuntimeJobInfoRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetJobResultMethod(), getCallOptions(), request);
    }
  }

  /**
   * A stub to allow clients to do ListenableFuture-style rpc calls to service TracRuntimeApi.
   */
  public static final class TracRuntimeApiFutureStub
      extends io.grpc.stub.AbstractFutureStub {
    private TracRuntimeApiFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected TracRuntimeApiFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new TracRuntimeApiFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture listJobs(
        org.finos.tracdap.api.internal.RuntimeListJobsRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getListJobsMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getJobStatus(
        org.finos.tracdap.api.internal.RuntimeJobInfoRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetJobStatusMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getJobResult(
        org.finos.tracdap.api.internal.RuntimeJobInfoRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetJobResultMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_LIST_JOBS = 0;
  private static final int METHODID_GET_JOB_STATUS = 1;
  private static final int METHODID_GET_JOB_RESULT = 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_LIST_JOBS:
          serviceImpl.listJobs((org.finos.tracdap.api.internal.RuntimeListJobsRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_JOB_STATUS:
          serviceImpl.getJobStatus((org.finos.tracdap.api.internal.RuntimeJobInfoRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_JOB_RESULT:
          serviceImpl.getJobResult((org.finos.tracdap.api.internal.RuntimeJobInfoRequest) 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(
          getListJobsMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              org.finos.tracdap.api.internal.RuntimeListJobsRequest,
              org.finos.tracdap.api.internal.RuntimeListJobsResponse>(
                service, METHODID_LIST_JOBS)))
        .addMethod(
          getGetJobStatusMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              org.finos.tracdap.api.internal.RuntimeJobInfoRequest,
              org.finos.tracdap.api.internal.RuntimeJobStatus>(
                service, METHODID_GET_JOB_STATUS)))
        .addMethod(
          getGetJobResultMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              org.finos.tracdap.api.internal.RuntimeJobInfoRequest,
              org.finos.tracdap.api.internal.RuntimeJobResult>(
                service, METHODID_GET_JOB_RESULT)))
        .build();
  }

  private static abstract class TracRuntimeApiBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    TracRuntimeApiBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return org.finos.tracdap.api.internal.Runtime.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("TracRuntimeApi");
    }
  }

  private static final class TracRuntimeApiFileDescriptorSupplier
      extends TracRuntimeApiBaseDescriptorSupplier {
    TracRuntimeApiFileDescriptorSupplier() {}
  }

  private static final class TracRuntimeApiMethodDescriptorSupplier
      extends TracRuntimeApiBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final java.lang.String methodName;

    TracRuntimeApiMethodDescriptorSupplier(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 (TracRuntimeApiGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new TracRuntimeApiFileDescriptorSupplier())
              .addMethod(getListJobsMethod())
              .addMethod(getGetJobStatusMethod())
              .addMethod(getGetJobResultMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy