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

grpc.gateway.testing.EchoServiceGrpc Maven / Gradle / Ivy

The newest version!
package grpc.gateway.testing;

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;

/**
 * 
 * A simple echo service.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.28.0)", comments = "Source: echo.proto") public final class EchoServiceGrpc { private EchoServiceGrpc() {} public static final String SERVICE_NAME = "grpc.gateway.testing.EchoService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getEchoMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Echo", requestType = grpc.gateway.testing.Echo.EchoRequest.class, responseType = grpc.gateway.testing.Echo.EchoResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getEchoMethod() { io.grpc.MethodDescriptor getEchoMethod; if ((getEchoMethod = EchoServiceGrpc.getEchoMethod) == null) { synchronized (EchoServiceGrpc.class) { if ((getEchoMethod = EchoServiceGrpc.getEchoMethod) == null) { EchoServiceGrpc.getEchoMethod = getEchoMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Echo")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.EchoRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.EchoResponse.getDefaultInstance())) .setSchemaDescriptor(new EchoServiceMethodDescriptorSupplier("Echo")) .build(); } } } return getEchoMethod; } private static volatile io.grpc.MethodDescriptor getEchoAbortMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "EchoAbort", requestType = grpc.gateway.testing.Echo.EchoRequest.class, responseType = grpc.gateway.testing.Echo.EchoResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getEchoAbortMethod() { io.grpc.MethodDescriptor getEchoAbortMethod; if ((getEchoAbortMethod = EchoServiceGrpc.getEchoAbortMethod) == null) { synchronized (EchoServiceGrpc.class) { if ((getEchoAbortMethod = EchoServiceGrpc.getEchoAbortMethod) == null) { EchoServiceGrpc.getEchoAbortMethod = getEchoAbortMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "EchoAbort")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.EchoRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.EchoResponse.getDefaultInstance())) .setSchemaDescriptor(new EchoServiceMethodDescriptorSupplier("EchoAbort")) .build(); } } } return getEchoAbortMethod; } private static volatile io.grpc.MethodDescriptor getNoOpMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "NoOp", requestType = grpc.gateway.testing.Echo.Empty.class, responseType = grpc.gateway.testing.Echo.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getNoOpMethod() { io.grpc.MethodDescriptor getNoOpMethod; if ((getNoOpMethod = EchoServiceGrpc.getNoOpMethod) == null) { synchronized (EchoServiceGrpc.class) { if ((getNoOpMethod = EchoServiceGrpc.getNoOpMethod) == null) { EchoServiceGrpc.getNoOpMethod = getNoOpMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "NoOp")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.Empty.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.Empty.getDefaultInstance())) .setSchemaDescriptor(new EchoServiceMethodDescriptorSupplier("NoOp")) .build(); } } } return getNoOpMethod; } private static volatile io.grpc.MethodDescriptor getServerStreamingEchoMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ServerStreamingEcho", requestType = grpc.gateway.testing.Echo.ServerStreamingEchoRequest.class, responseType = grpc.gateway.testing.Echo.ServerStreamingEchoResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) public static io.grpc.MethodDescriptor getServerStreamingEchoMethod() { io.grpc.MethodDescriptor getServerStreamingEchoMethod; if ((getServerStreamingEchoMethod = EchoServiceGrpc.getServerStreamingEchoMethod) == null) { synchronized (EchoServiceGrpc.class) { if ((getServerStreamingEchoMethod = EchoServiceGrpc.getServerStreamingEchoMethod) == null) { EchoServiceGrpc.getServerStreamingEchoMethod = getServerStreamingEchoMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ServerStreamingEcho")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.ServerStreamingEchoRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.ServerStreamingEchoResponse.getDefaultInstance())) .setSchemaDescriptor(new EchoServiceMethodDescriptorSupplier("ServerStreamingEcho")) .build(); } } } return getServerStreamingEchoMethod; } private static volatile io.grpc.MethodDescriptor getServerStreamingEchoAbortMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ServerStreamingEchoAbort", requestType = grpc.gateway.testing.Echo.ServerStreamingEchoRequest.class, responseType = grpc.gateway.testing.Echo.ServerStreamingEchoResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) public static io.grpc.MethodDescriptor getServerStreamingEchoAbortMethod() { io.grpc.MethodDescriptor getServerStreamingEchoAbortMethod; if ((getServerStreamingEchoAbortMethod = EchoServiceGrpc.getServerStreamingEchoAbortMethod) == null) { synchronized (EchoServiceGrpc.class) { if ((getServerStreamingEchoAbortMethod = EchoServiceGrpc.getServerStreamingEchoAbortMethod) == null) { EchoServiceGrpc.getServerStreamingEchoAbortMethod = getServerStreamingEchoAbortMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ServerStreamingEchoAbort")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.ServerStreamingEchoRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.ServerStreamingEchoResponse.getDefaultInstance())) .setSchemaDescriptor(new EchoServiceMethodDescriptorSupplier("ServerStreamingEchoAbort")) .build(); } } } return getServerStreamingEchoAbortMethod; } private static volatile io.grpc.MethodDescriptor getClientStreamingEchoMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ClientStreamingEcho", requestType = grpc.gateway.testing.Echo.ClientStreamingEchoRequest.class, responseType = grpc.gateway.testing.Echo.ClientStreamingEchoResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING) public static io.grpc.MethodDescriptor getClientStreamingEchoMethod() { io.grpc.MethodDescriptor getClientStreamingEchoMethod; if ((getClientStreamingEchoMethod = EchoServiceGrpc.getClientStreamingEchoMethod) == null) { synchronized (EchoServiceGrpc.class) { if ((getClientStreamingEchoMethod = EchoServiceGrpc.getClientStreamingEchoMethod) == null) { EchoServiceGrpc.getClientStreamingEchoMethod = getClientStreamingEchoMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ClientStreamingEcho")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.ClientStreamingEchoRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.ClientStreamingEchoResponse.getDefaultInstance())) .setSchemaDescriptor(new EchoServiceMethodDescriptorSupplier("ClientStreamingEcho")) .build(); } } } return getClientStreamingEchoMethod; } private static volatile io.grpc.MethodDescriptor getFullDuplexEchoMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "FullDuplexEcho", requestType = grpc.gateway.testing.Echo.EchoRequest.class, responseType = grpc.gateway.testing.Echo.EchoResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) public static io.grpc.MethodDescriptor getFullDuplexEchoMethod() { io.grpc.MethodDescriptor getFullDuplexEchoMethod; if ((getFullDuplexEchoMethod = EchoServiceGrpc.getFullDuplexEchoMethod) == null) { synchronized (EchoServiceGrpc.class) { if ((getFullDuplexEchoMethod = EchoServiceGrpc.getFullDuplexEchoMethod) == null) { EchoServiceGrpc.getFullDuplexEchoMethod = getFullDuplexEchoMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FullDuplexEcho")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.EchoRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.EchoResponse.getDefaultInstance())) .setSchemaDescriptor(new EchoServiceMethodDescriptorSupplier("FullDuplexEcho")) .build(); } } } return getFullDuplexEchoMethod; } private static volatile io.grpc.MethodDescriptor getHalfDuplexEchoMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "HalfDuplexEcho", requestType = grpc.gateway.testing.Echo.EchoRequest.class, responseType = grpc.gateway.testing.Echo.EchoResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) public static io.grpc.MethodDescriptor getHalfDuplexEchoMethod() { io.grpc.MethodDescriptor getHalfDuplexEchoMethod; if ((getHalfDuplexEchoMethod = EchoServiceGrpc.getHalfDuplexEchoMethod) == null) { synchronized (EchoServiceGrpc.class) { if ((getHalfDuplexEchoMethod = EchoServiceGrpc.getHalfDuplexEchoMethod) == null) { EchoServiceGrpc.getHalfDuplexEchoMethod = getHalfDuplexEchoMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "HalfDuplexEcho")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.EchoRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( grpc.gateway.testing.Echo.EchoResponse.getDefaultInstance())) .setSchemaDescriptor(new EchoServiceMethodDescriptorSupplier("HalfDuplexEcho")) .build(); } } } return getHalfDuplexEchoMethod; } /** * Creates a new async stub that supports all call types for the service */ public static EchoServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public EchoServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EchoServiceStub(channel, callOptions); } }; return EchoServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static EchoServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public EchoServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EchoServiceBlockingStub(channel, callOptions); } }; return EchoServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static EchoServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public EchoServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EchoServiceFutureStub(channel, callOptions); } }; return EchoServiceFutureStub.newStub(factory, channel); } /** *
   * A simple echo service.
   * 
*/ public static abstract class EchoServiceImplBase implements io.grpc.BindableService { /** *
     * One request followed by one response
     * The server returns the client message as-is.
     * 
*/ public void echo(grpc.gateway.testing.Echo.EchoRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getEchoMethod(), responseObserver); } /** *
     * Sends back abort status.
     * 
*/ public void echoAbort(grpc.gateway.testing.Echo.EchoRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getEchoAbortMethod(), responseObserver); } /** *
     * One empty request, ZERO processing, followed by one empty response
     * (minimum effort to do message serialization).
     * 
*/ public void noOp(grpc.gateway.testing.Echo.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getNoOpMethod(), responseObserver); } /** *
     * One request followed by a sequence of responses (streamed download).
     * The server will return the same client message repeatedly.
     * 
*/ public void serverStreamingEcho(grpc.gateway.testing.Echo.ServerStreamingEchoRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getServerStreamingEchoMethod(), responseObserver); } /** *
     * One request followed by a sequence of responses (streamed download).
     * The server abort directly.
     * 
*/ public void serverStreamingEchoAbort(grpc.gateway.testing.Echo.ServerStreamingEchoRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getServerStreamingEchoAbortMethod(), responseObserver); } /** *
     * A sequence of requests followed by one response (streamed upload).
     * The server returns the total number of messages as the result.
     * 
*/ public io.grpc.stub.StreamObserver clientStreamingEcho( io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getClientStreamingEchoMethod(), responseObserver); } /** *
     * A sequence of requests with each message echoed by the server immediately.
     * The server returns the same client messages in order.
     * E.g. this is how the speech API works.
     * 
*/ public io.grpc.stub.StreamObserver fullDuplexEcho( io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getFullDuplexEchoMethod(), responseObserver); } /** *
     * A sequence of requests followed by a sequence of responses.
     * The server buffers all the client messages and then returns the same
     * client messages one by one after the client half-closes the stream.
     * This is how an image recognition API may work.
     * 
*/ public io.grpc.stub.StreamObserver halfDuplexEcho( io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getHalfDuplexEchoMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getEchoMethod(), asyncUnaryCall( new MethodHandlers< grpc.gateway.testing.Echo.EchoRequest, grpc.gateway.testing.Echo.EchoResponse>( this, METHODID_ECHO))) .addMethod( getEchoAbortMethod(), asyncUnaryCall( new MethodHandlers< grpc.gateway.testing.Echo.EchoRequest, grpc.gateway.testing.Echo.EchoResponse>( this, METHODID_ECHO_ABORT))) .addMethod( getNoOpMethod(), asyncUnaryCall( new MethodHandlers< grpc.gateway.testing.Echo.Empty, grpc.gateway.testing.Echo.Empty>( this, METHODID_NO_OP))) .addMethod( getServerStreamingEchoMethod(), asyncServerStreamingCall( new MethodHandlers< grpc.gateway.testing.Echo.ServerStreamingEchoRequest, grpc.gateway.testing.Echo.ServerStreamingEchoResponse>( this, METHODID_SERVER_STREAMING_ECHO))) .addMethod( getServerStreamingEchoAbortMethod(), asyncServerStreamingCall( new MethodHandlers< grpc.gateway.testing.Echo.ServerStreamingEchoRequest, grpc.gateway.testing.Echo.ServerStreamingEchoResponse>( this, METHODID_SERVER_STREAMING_ECHO_ABORT))) .addMethod( getClientStreamingEchoMethod(), asyncClientStreamingCall( new MethodHandlers< grpc.gateway.testing.Echo.ClientStreamingEchoRequest, grpc.gateway.testing.Echo.ClientStreamingEchoResponse>( this, METHODID_CLIENT_STREAMING_ECHO))) .addMethod( getFullDuplexEchoMethod(), asyncBidiStreamingCall( new MethodHandlers< grpc.gateway.testing.Echo.EchoRequest, grpc.gateway.testing.Echo.EchoResponse>( this, METHODID_FULL_DUPLEX_ECHO))) .addMethod( getHalfDuplexEchoMethod(), asyncBidiStreamingCall( new MethodHandlers< grpc.gateway.testing.Echo.EchoRequest, grpc.gateway.testing.Echo.EchoResponse>( this, METHODID_HALF_DUPLEX_ECHO))) .build(); } } /** *
   * A simple echo service.
   * 
*/ public static final class EchoServiceStub extends io.grpc.stub.AbstractAsyncStub { private EchoServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected EchoServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EchoServiceStub(channel, callOptions); } /** *
     * One request followed by one response
     * The server returns the client message as-is.
     * 
*/ public void echo(grpc.gateway.testing.Echo.EchoRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getEchoMethod(), getCallOptions()), request, responseObserver); } /** *
     * Sends back abort status.
     * 
*/ public void echoAbort(grpc.gateway.testing.Echo.EchoRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getEchoAbortMethod(), getCallOptions()), request, responseObserver); } /** *
     * One empty request, ZERO processing, followed by one empty response
     * (minimum effort to do message serialization).
     * 
*/ public void noOp(grpc.gateway.testing.Echo.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getNoOpMethod(), getCallOptions()), request, responseObserver); } /** *
     * One request followed by a sequence of responses (streamed download).
     * The server will return the same client message repeatedly.
     * 
*/ public void serverStreamingEcho(grpc.gateway.testing.Echo.ServerStreamingEchoRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( getChannel().newCall(getServerStreamingEchoMethod(), getCallOptions()), request, responseObserver); } /** *
     * One request followed by a sequence of responses (streamed download).
     * The server abort directly.
     * 
*/ public void serverStreamingEchoAbort(grpc.gateway.testing.Echo.ServerStreamingEchoRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( getChannel().newCall(getServerStreamingEchoAbortMethod(), getCallOptions()), request, responseObserver); } /** *
     * A sequence of requests followed by one response (streamed upload).
     * The server returns the total number of messages as the result.
     * 
*/ public io.grpc.stub.StreamObserver clientStreamingEcho( io.grpc.stub.StreamObserver responseObserver) { return asyncClientStreamingCall( getChannel().newCall(getClientStreamingEchoMethod(), getCallOptions()), responseObserver); } /** *
     * A sequence of requests with each message echoed by the server immediately.
     * The server returns the same client messages in order.
     * E.g. this is how the speech API works.
     * 
*/ public io.grpc.stub.StreamObserver fullDuplexEcho( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getFullDuplexEchoMethod(), getCallOptions()), responseObserver); } /** *
     * A sequence of requests followed by a sequence of responses.
     * The server buffers all the client messages and then returns the same
     * client messages one by one after the client half-closes the stream.
     * This is how an image recognition API may work.
     * 
*/ public io.grpc.stub.StreamObserver halfDuplexEcho( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getHalfDuplexEchoMethod(), getCallOptions()), responseObserver); } } /** *
   * A simple echo service.
   * 
*/ public static final class EchoServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private EchoServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected EchoServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EchoServiceBlockingStub(channel, callOptions); } /** *
     * One request followed by one response
     * The server returns the client message as-is.
     * 
*/ public grpc.gateway.testing.Echo.EchoResponse echo(grpc.gateway.testing.Echo.EchoRequest request) { return blockingUnaryCall( getChannel(), getEchoMethod(), getCallOptions(), request); } /** *
     * Sends back abort status.
     * 
*/ public grpc.gateway.testing.Echo.EchoResponse echoAbort(grpc.gateway.testing.Echo.EchoRequest request) { return blockingUnaryCall( getChannel(), getEchoAbortMethod(), getCallOptions(), request); } /** *
     * One empty request, ZERO processing, followed by one empty response
     * (minimum effort to do message serialization).
     * 
*/ public grpc.gateway.testing.Echo.Empty noOp(grpc.gateway.testing.Echo.Empty request) { return blockingUnaryCall( getChannel(), getNoOpMethod(), getCallOptions(), request); } /** *
     * One request followed by a sequence of responses (streamed download).
     * The server will return the same client message repeatedly.
     * 
*/ public java.util.Iterator serverStreamingEcho( grpc.gateway.testing.Echo.ServerStreamingEchoRequest request) { return blockingServerStreamingCall( getChannel(), getServerStreamingEchoMethod(), getCallOptions(), request); } /** *
     * One request followed by a sequence of responses (streamed download).
     * The server abort directly.
     * 
*/ public java.util.Iterator serverStreamingEchoAbort( grpc.gateway.testing.Echo.ServerStreamingEchoRequest request) { return blockingServerStreamingCall( getChannel(), getServerStreamingEchoAbortMethod(), getCallOptions(), request); } } /** *
   * A simple echo service.
   * 
*/ public static final class EchoServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private EchoServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected EchoServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EchoServiceFutureStub(channel, callOptions); } /** *
     * One request followed by one response
     * The server returns the client message as-is.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture echo( grpc.gateway.testing.Echo.EchoRequest request) { return futureUnaryCall( getChannel().newCall(getEchoMethod(), getCallOptions()), request); } /** *
     * Sends back abort status.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture echoAbort( grpc.gateway.testing.Echo.EchoRequest request) { return futureUnaryCall( getChannel().newCall(getEchoAbortMethod(), getCallOptions()), request); } /** *
     * One empty request, ZERO processing, followed by one empty response
     * (minimum effort to do message serialization).
     * 
*/ public com.google.common.util.concurrent.ListenableFuture noOp( grpc.gateway.testing.Echo.Empty request) { return futureUnaryCall( getChannel().newCall(getNoOpMethod(), getCallOptions()), request); } } private static final int METHODID_ECHO = 0; private static final int METHODID_ECHO_ABORT = 1; private static final int METHODID_NO_OP = 2; private static final int METHODID_SERVER_STREAMING_ECHO = 3; private static final int METHODID_SERVER_STREAMING_ECHO_ABORT = 4; private static final int METHODID_CLIENT_STREAMING_ECHO = 5; private static final int METHODID_FULL_DUPLEX_ECHO = 6; private static final int METHODID_HALF_DUPLEX_ECHO = 7; 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 EchoServiceImplBase serviceImpl; private final int methodId; MethodHandlers(EchoServiceImplBase 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_ECHO: serviceImpl.echo((grpc.gateway.testing.Echo.EchoRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_ECHO_ABORT: serviceImpl.echoAbort((grpc.gateway.testing.Echo.EchoRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_NO_OP: serviceImpl.noOp((grpc.gateway.testing.Echo.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_SERVER_STREAMING_ECHO: serviceImpl.serverStreamingEcho((grpc.gateway.testing.Echo.ServerStreamingEchoRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_SERVER_STREAMING_ECHO_ABORT: serviceImpl.serverStreamingEchoAbort((grpc.gateway.testing.Echo.ServerStreamingEchoRequest) 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_CLIENT_STREAMING_ECHO: return (io.grpc.stub.StreamObserver) serviceImpl.clientStreamingEcho( (io.grpc.stub.StreamObserver) responseObserver); case METHODID_FULL_DUPLEX_ECHO: return (io.grpc.stub.StreamObserver) serviceImpl.fullDuplexEcho( (io.grpc.stub.StreamObserver) responseObserver); case METHODID_HALF_DUPLEX_ECHO: return (io.grpc.stub.StreamObserver) serviceImpl.halfDuplexEcho( (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } } } private static abstract class EchoServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { EchoServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return grpc.gateway.testing.Echo.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("EchoService"); } } private static final class EchoServiceFileDescriptorSupplier extends EchoServiceBaseDescriptorSupplier { EchoServiceFileDescriptorSupplier() {} } private static final class EchoServiceMethodDescriptorSupplier extends EchoServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; EchoServiceMethodDescriptorSupplier(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 (EchoServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new EchoServiceFileDescriptorSupplier()) .addMethod(getEchoMethod()) .addMethod(getEchoAbortMethod()) .addMethod(getNoOpMethod()) .addMethod(getServerStreamingEchoMethod()) .addMethod(getServerStreamingEchoAbortMethod()) .addMethod(getClientStreamingEchoMethod()) .addMethod(getFullDuplexEchoMethod()) .addMethod(getHalfDuplexEchoMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy