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

io.envoyproxy.envoy.service.ext_proc.v3.ExternalProcessorGrpc Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
package io.envoyproxy.envoy.service.ext_proc.v3;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.48.1)",
    comments = "Source: envoy/service/ext_proc/v3/external_processor.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ExternalProcessorGrpc {

  private ExternalProcessorGrpc() {}

  public static final String SERVICE_NAME = "envoy.service.ext_proc.v3.ExternalProcessor";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "Process",
      requestType = io.envoyproxy.envoy.service.ext_proc.v3.ProcessingRequest.class,
      responseType = io.envoyproxy.envoy.service.ext_proc.v3.ProcessingResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getProcessMethod() {
    io.grpc.MethodDescriptor getProcessMethod;
    if ((getProcessMethod = ExternalProcessorGrpc.getProcessMethod) == null) {
      synchronized (ExternalProcessorGrpc.class) {
        if ((getProcessMethod = ExternalProcessorGrpc.getProcessMethod) == null) {
          ExternalProcessorGrpc.getProcessMethod = getProcessMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Process"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.envoyproxy.envoy.service.ext_proc.v3.ProcessingRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.envoyproxy.envoy.service.ext_proc.v3.ProcessingResponse.getDefaultInstance()))
              .setSchemaDescriptor(new ExternalProcessorMethodDescriptorSupplier("Process"))
              .build();
        }
      }
    }
    return getProcessMethod;
  }

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

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

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

  /**
   */
  public static abstract class ExternalProcessorImplBase implements io.grpc.BindableService {

    /**
     * 
     * This begins the bidirectional stream that Envoy will use to
     * give the server control over what the filter does. The actual
     * protocol is described by the ProcessingRequest and ProcessingResponse
     * messages below.
     * 
*/ public io.grpc.stub.StreamObserver process( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getProcessMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getProcessMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< io.envoyproxy.envoy.service.ext_proc.v3.ProcessingRequest, io.envoyproxy.envoy.service.ext_proc.v3.ProcessingResponse>( this, METHODID_PROCESS))) .build(); } } /** */ public static final class ExternalProcessorStub extends io.grpc.stub.AbstractAsyncStub { private ExternalProcessorStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ExternalProcessorStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ExternalProcessorStub(channel, callOptions); } /** *
     * This begins the bidirectional stream that Envoy will use to
     * give the server control over what the filter does. The actual
     * protocol is described by the ProcessingRequest and ProcessingResponse
     * messages below.
     * 
*/ public io.grpc.stub.StreamObserver process( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getProcessMethod(), getCallOptions()), responseObserver); } } /** */ public static final class ExternalProcessorBlockingStub extends io.grpc.stub.AbstractBlockingStub { private ExternalProcessorBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ExternalProcessorBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ExternalProcessorBlockingStub(channel, callOptions); } } /** */ public static final class ExternalProcessorFutureStub extends io.grpc.stub.AbstractFutureStub { private ExternalProcessorFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ExternalProcessorFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ExternalProcessorFutureStub(channel, callOptions); } } private static final int METHODID_PROCESS = 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 ExternalProcessorImplBase serviceImpl; private final int methodId; MethodHandlers(ExternalProcessorImplBase 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_PROCESS: return (io.grpc.stub.StreamObserver) serviceImpl.process( (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } } } private static abstract class ExternalProcessorBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ExternalProcessorBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.envoyproxy.envoy.service.ext_proc.v3.ExternalProcessorProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("ExternalProcessor"); } } private static final class ExternalProcessorFileDescriptorSupplier extends ExternalProcessorBaseDescriptorSupplier { ExternalProcessorFileDescriptorSupplier() {} } private static final class ExternalProcessorMethodDescriptorSupplier extends ExternalProcessorBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; ExternalProcessorMethodDescriptorSupplier(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 (ExternalProcessorGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ExternalProcessorFileDescriptorSupplier()) .addMethod(getProcessMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy