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

The newest version!
package io.envoyproxy.envoy.service.ext_proc.v3;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * A service that can access and modify HTTP requests and responses
 * as part of a filter chain.
 * The overall external processing protocol works like this:
 * 1. Envoy sends to the service information about the HTTP request.
 * 2. The service sends back a ProcessingResponse message that directs Envoy
 *    to either stop processing, continue without it, or send it the
 *    next chunk of the message body.
 * 3. If so requested, Envoy sends the server the message body in chunks,
 *    or the entire body at once. In either case, the server may send back
 *    a ProcessingResponse for each message it receives, or wait for certain amount
 *    of body chunks received before streams back the ProcessingResponse messages.
 * 4. If so requested, Envoy sends the server the HTTP trailers,
 *    and the server sends back a ProcessingResponse.
 * 5. At this point, request processing is done, and we pick up again
 *    at step 1 when Envoy receives a response from the upstream server.
 * 6. At any point above, if the server closes the gRPC stream cleanly,
 *    then Envoy proceeds without consulting the server.
 * 7. At any point above, if the server closes the gRPC stream with an error,
 *    then Envoy returns a 500 error to the client, unless the filter
 *    was configured to ignore errors.
 * In other words, the process is a request/response conversation, but
 * using a gRPC stream to make it easier for the server to
 * maintain state.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.62.2)", comments = "Source: envoy/service/ext_proc/v3/external_processor.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ExternalProcessorGrpc { private ExternalProcessorGrpc() {} public static final java.lang.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); } /** *
   * A service that can access and modify HTTP requests and responses
   * as part of a filter chain.
   * The overall external processing protocol works like this:
   * 1. Envoy sends to the service information about the HTTP request.
   * 2. The service sends back a ProcessingResponse message that directs Envoy
   *    to either stop processing, continue without it, or send it the
   *    next chunk of the message body.
   * 3. If so requested, Envoy sends the server the message body in chunks,
   *    or the entire body at once. In either case, the server may send back
   *    a ProcessingResponse for each message it receives, or wait for certain amount
   *    of body chunks received before streams back the ProcessingResponse messages.
   * 4. If so requested, Envoy sends the server the HTTP trailers,
   *    and the server sends back a ProcessingResponse.
   * 5. At this point, request processing is done, and we pick up again
   *    at step 1 when Envoy receives a response from the upstream server.
   * 6. At any point above, if the server closes the gRPC stream cleanly,
   *    then Envoy proceeds without consulting the server.
   * 7. At any point above, if the server closes the gRPC stream with an error,
   *    then Envoy returns a 500 error to the client, unless the filter
   *    was configured to ignore errors.
   * In other words, the process is a request/response conversation, but
   * using a gRPC stream to make it easier for the server to
   * maintain state.
   * 
*/ public interface AsyncService { /** *
     * 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.
     * 
*/ default io.grpc.stub.StreamObserver process( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getProcessMethod(), responseObserver); } } /** * Base class for the server implementation of the service ExternalProcessor. *
   * A service that can access and modify HTTP requests and responses
   * as part of a filter chain.
   * The overall external processing protocol works like this:
   * 1. Envoy sends to the service information about the HTTP request.
   * 2. The service sends back a ProcessingResponse message that directs Envoy
   *    to either stop processing, continue without it, or send it the
   *    next chunk of the message body.
   * 3. If so requested, Envoy sends the server the message body in chunks,
   *    or the entire body at once. In either case, the server may send back
   *    a ProcessingResponse for each message it receives, or wait for certain amount
   *    of body chunks received before streams back the ProcessingResponse messages.
   * 4. If so requested, Envoy sends the server the HTTP trailers,
   *    and the server sends back a ProcessingResponse.
   * 5. At this point, request processing is done, and we pick up again
   *    at step 1 when Envoy receives a response from the upstream server.
   * 6. At any point above, if the server closes the gRPC stream cleanly,
   *    then Envoy proceeds without consulting the server.
   * 7. At any point above, if the server closes the gRPC stream with an error,
   *    then Envoy returns a 500 error to the client, unless the filter
   *    was configured to ignore errors.
   * In other words, the process is a request/response conversation, but
   * using a gRPC stream to make it easier for the server to
   * maintain state.
   * 
*/ public static abstract class ExternalProcessorImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return ExternalProcessorGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service ExternalProcessor. *
   * A service that can access and modify HTTP requests and responses
   * as part of a filter chain.
   * The overall external processing protocol works like this:
   * 1. Envoy sends to the service information about the HTTP request.
   * 2. The service sends back a ProcessingResponse message that directs Envoy
   *    to either stop processing, continue without it, or send it the
   *    next chunk of the message body.
   * 3. If so requested, Envoy sends the server the message body in chunks,
   *    or the entire body at once. In either case, the server may send back
   *    a ProcessingResponse for each message it receives, or wait for certain amount
   *    of body chunks received before streams back the ProcessingResponse messages.
   * 4. If so requested, Envoy sends the server the HTTP trailers,
   *    and the server sends back a ProcessingResponse.
   * 5. At this point, request processing is done, and we pick up again
   *    at step 1 when Envoy receives a response from the upstream server.
   * 6. At any point above, if the server closes the gRPC stream cleanly,
   *    then Envoy proceeds without consulting the server.
   * 7. At any point above, if the server closes the gRPC stream with an error,
   *    then Envoy returns a 500 error to the client, unless the filter
   *    was configured to ignore errors.
   * In other words, the process is a request/response conversation, but
   * using a gRPC stream to make it easier for the server to
   * maintain state.
   * 
*/ 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); } } /** * A stub to allow clients to do synchronous rpc calls to service ExternalProcessor. *
   * A service that can access and modify HTTP requests and responses
   * as part of a filter chain.
   * The overall external processing protocol works like this:
   * 1. Envoy sends to the service information about the HTTP request.
   * 2. The service sends back a ProcessingResponse message that directs Envoy
   *    to either stop processing, continue without it, or send it the
   *    next chunk of the message body.
   * 3. If so requested, Envoy sends the server the message body in chunks,
   *    or the entire body at once. In either case, the server may send back
   *    a ProcessingResponse for each message it receives, or wait for certain amount
   *    of body chunks received before streams back the ProcessingResponse messages.
   * 4. If so requested, Envoy sends the server the HTTP trailers,
   *    and the server sends back a ProcessingResponse.
   * 5. At this point, request processing is done, and we pick up again
   *    at step 1 when Envoy receives a response from the upstream server.
   * 6. At any point above, if the server closes the gRPC stream cleanly,
   *    then Envoy proceeds without consulting the server.
   * 7. At any point above, if the server closes the gRPC stream with an error,
   *    then Envoy returns a 500 error to the client, unless the filter
   *    was configured to ignore errors.
   * In other words, the process is a request/response conversation, but
   * using a gRPC stream to make it easier for the server to
   * maintain state.
   * 
*/ 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); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service ExternalProcessor. *
   * A service that can access and modify HTTP requests and responses
   * as part of a filter chain.
   * The overall external processing protocol works like this:
   * 1. Envoy sends to the service information about the HTTP request.
   * 2. The service sends back a ProcessingResponse message that directs Envoy
   *    to either stop processing, continue without it, or send it the
   *    next chunk of the message body.
   * 3. If so requested, Envoy sends the server the message body in chunks,
   *    or the entire body at once. In either case, the server may send back
   *    a ProcessingResponse for each message it receives, or wait for certain amount
   *    of body chunks received before streams back the ProcessingResponse messages.
   * 4. If so requested, Envoy sends the server the HTTP trailers,
   *    and the server sends back a ProcessingResponse.
   * 5. At this point, request processing is done, and we pick up again
   *    at step 1 when Envoy receives a response from the upstream server.
   * 6. At any point above, if the server closes the gRPC stream cleanly,
   *    then Envoy proceeds without consulting the server.
   * 7. At any point above, if the server closes the gRPC stream with an error,
   *    then Envoy returns a 500 error to the client, unless the filter
   *    was configured to ignore errors.
   * In other words, the process is a request/response conversation, but
   * using a gRPC stream to make it easier for the server to
   * maintain state.
   * 
*/ 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 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) { 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(); } } } public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { 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>( service, METHODID_PROCESS))) .build(); } 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 java.lang.String methodName; ExternalProcessorMethodDescriptorSupplier(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 (ExternalProcessorGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ExternalProcessorFileDescriptorSupplier()) .addMethod(getProcessMethod()) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy