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

io.grpc.testing.integration.TestServiceGrpc Maven / Gradle / Ivy

There is a newer version: 1.68.0
Show newest version
package io.grpc.testing.integration;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * A simple service to test the various types of RPCs and experiment with
 * performance with various types of payload.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: grpc/testing/test.proto") @io.grpc.stub.annotations.GrpcGenerated public final class TestServiceGrpc { private TestServiceGrpc() {} public static final java.lang.String SERVICE_NAME = "grpc.testing.TestService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getEmptyCallMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "EmptyCall", requestType = io.grpc.testing.integration.EmptyProtos.Empty.class, responseType = io.grpc.testing.integration.EmptyProtos.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getEmptyCallMethod() { io.grpc.MethodDescriptor getEmptyCallMethod; if ((getEmptyCallMethod = TestServiceGrpc.getEmptyCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getEmptyCallMethod = TestServiceGrpc.getEmptyCallMethod) == null) { TestServiceGrpc.getEmptyCallMethod = getEmptyCallMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "EmptyCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("EmptyCall")) .build(); } } } return getEmptyCallMethod; } private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "UnaryCall", requestType = io.grpc.testing.integration.Messages.SimpleRequest.class, responseType = io.grpc.testing.integration.Messages.SimpleResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getUnaryCallMethod() { io.grpc.MethodDescriptor getUnaryCallMethod; if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { TestServiceGrpc.getUnaryCallMethod = getUnaryCallMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnaryCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.SimpleRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.SimpleResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("UnaryCall")) .build(); } } } return getUnaryCallMethod; } private static volatile io.grpc.MethodDescriptor getCacheableUnaryCallMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "CacheableUnaryCall", requestType = io.grpc.testing.integration.Messages.SimpleRequest.class, responseType = io.grpc.testing.integration.Messages.SimpleResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getCacheableUnaryCallMethod() { io.grpc.MethodDescriptor getCacheableUnaryCallMethod; if ((getCacheableUnaryCallMethod = TestServiceGrpc.getCacheableUnaryCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getCacheableUnaryCallMethod = TestServiceGrpc.getCacheableUnaryCallMethod) == null) { TestServiceGrpc.getCacheableUnaryCallMethod = getCacheableUnaryCallMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CacheableUnaryCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.SimpleRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.SimpleResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("CacheableUnaryCall")) .build(); } } } return getCacheableUnaryCallMethod; } private static volatile io.grpc.MethodDescriptor getStreamingOutputCallMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "StreamingOutputCall", requestType = io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class, responseType = io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) public static io.grpc.MethodDescriptor getStreamingOutputCallMethod() { io.grpc.MethodDescriptor getStreamingOutputCallMethod; if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { TestServiceGrpc.getStreamingOutputCallMethod = getStreamingOutputCallMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamingOutputCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("StreamingOutputCall")) .build(); } } } return getStreamingOutputCallMethod; } private static volatile io.grpc.MethodDescriptor getStreamingInputCallMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "StreamingInputCall", requestType = io.grpc.testing.integration.Messages.StreamingInputCallRequest.class, responseType = io.grpc.testing.integration.Messages.StreamingInputCallResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING) public static io.grpc.MethodDescriptor getStreamingInputCallMethod() { io.grpc.MethodDescriptor getStreamingInputCallMethod; if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { TestServiceGrpc.getStreamingInputCallMethod = getStreamingInputCallMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamingInputCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.StreamingInputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.StreamingInputCallResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("StreamingInputCall")) .build(); } } } return getStreamingInputCallMethod; } private static volatile io.grpc.MethodDescriptor getFullDuplexCallMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "FullDuplexCall", requestType = io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class, responseType = io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) public static io.grpc.MethodDescriptor getFullDuplexCallMethod() { io.grpc.MethodDescriptor getFullDuplexCallMethod; if ((getFullDuplexCallMethod = TestServiceGrpc.getFullDuplexCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getFullDuplexCallMethod = TestServiceGrpc.getFullDuplexCallMethod) == null) { TestServiceGrpc.getFullDuplexCallMethod = getFullDuplexCallMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FullDuplexCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("FullDuplexCall")) .build(); } } } return getFullDuplexCallMethod; } private static volatile io.grpc.MethodDescriptor getHalfDuplexCallMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "HalfDuplexCall", requestType = io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class, responseType = io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) public static io.grpc.MethodDescriptor getHalfDuplexCallMethod() { io.grpc.MethodDescriptor getHalfDuplexCallMethod; if ((getHalfDuplexCallMethod = TestServiceGrpc.getHalfDuplexCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getHalfDuplexCallMethod = TestServiceGrpc.getHalfDuplexCallMethod) == null) { TestServiceGrpc.getHalfDuplexCallMethod = getHalfDuplexCallMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "HalfDuplexCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("HalfDuplexCall")) .build(); } } } return getHalfDuplexCallMethod; } private static volatile io.grpc.MethodDescriptor getUnimplementedCallMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "UnimplementedCall", requestType = io.grpc.testing.integration.EmptyProtos.Empty.class, responseType = io.grpc.testing.integration.EmptyProtos.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getUnimplementedCallMethod() { io.grpc.MethodDescriptor getUnimplementedCallMethod; if ((getUnimplementedCallMethod = TestServiceGrpc.getUnimplementedCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getUnimplementedCallMethod = TestServiceGrpc.getUnimplementedCallMethod) == null) { TestServiceGrpc.getUnimplementedCallMethod = getUnimplementedCallMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnimplementedCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("UnimplementedCall")) .build(); } } } return getUnimplementedCallMethod; } /** * Creates a new async stub that supports all call types for the service */ public static TestServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public TestServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new TestServiceStub(channel, callOptions); } }; return TestServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static TestServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public TestServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new TestServiceBlockingStub(channel, callOptions); } }; return TestServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static TestServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public TestServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new TestServiceFutureStub(channel, callOptions); } }; return TestServiceFutureStub.newStub(factory, channel); } /** *
   * A simple service to test the various types of RPCs and experiment with
   * performance with various types of payload.
   * 
*/ public interface AsyncService { /** *
     * One empty request followed by one empty response.
     * 
*/ default void emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getEmptyCallMethod(), responseObserver); } /** *
     * One request followed by one response.
     * 
*/ default void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnaryCallMethod(), responseObserver); } /** *
     * One request followed by one response. Response has cache control
     * headers set such that a caching HTTP proxy (such as GFE) can
     * satisfy subsequent requests.
     * 
*/ default void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCacheableUnaryCallMethod(), responseObserver); } /** *
     * One request followed by a sequence of responses (streamed download).
     * The server returns the payload with client desired type and sizes.
     * 
*/ default void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStreamingOutputCallMethod(), responseObserver); } /** *
     * A sequence of requests followed by one response (streamed upload).
     * The server returns the aggregated size of client payload as the result.
     * 
*/ default io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStreamingInputCallMethod(), responseObserver); } /** *
     * A sequence of requests with each request served by the server immediately.
     * As one request could lead to multiple responses, this interface
     * demonstrates the idea of full duplexing.
     * 
*/ default io.grpc.stub.StreamObserver fullDuplexCall( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getFullDuplexCallMethod(), responseObserver); } /** *
     * A sequence of requests followed by a sequence of responses.
     * The server buffers all the client requests and then serves them in order. A
     * stream of responses are returned to the client when the server starts with
     * first request.
     * 
*/ default io.grpc.stub.StreamObserver halfDuplexCall( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getHalfDuplexCallMethod(), responseObserver); } /** *
     * The test server will not implement this method. It will be used
     * to test the behavior when clients call unimplemented methods.
     * 
*/ default void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnimplementedCallMethod(), responseObserver); } } /** * Base class for the server implementation of the service TestService. *
   * A simple service to test the various types of RPCs and experiment with
   * performance with various types of payload.
   * 
*/ public static abstract class TestServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return TestServiceGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service TestService. *
   * A simple service to test the various types of RPCs and experiment with
   * performance with various types of payload.
   * 
*/ public static final class TestServiceStub extends io.grpc.stub.AbstractAsyncStub { private TestServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected TestServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new TestServiceStub(channel, callOptions); } /** *
     * One empty request followed by one empty response.
     * 
*/ public void emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getEmptyCallMethod(), getCallOptions()), request, responseObserver); } /** *
     * One request followed by one response.
     * 
*/ public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request, responseObserver); } /** *
     * One request followed by one response. Response has cache control
     * headers set such that a caching HTTP proxy (such as GFE) can
     * satisfy subsequent requests.
     * 
*/ public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCacheableUnaryCallMethod(), getCallOptions()), request, responseObserver); } /** *
     * One request followed by a sequence of responses (streamed download).
     * The server returns the payload with client desired type and sizes.
     * 
*/ public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getStreamingOutputCallMethod(), getCallOptions()), request, responseObserver); } /** *
     * A sequence of requests followed by one response (streamed upload).
     * The server returns the aggregated size of client payload as the result.
     * 
*/ public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncClientStreamingCall( getChannel().newCall(getStreamingInputCallMethod(), getCallOptions()), responseObserver); } /** *
     * A sequence of requests with each request served by the server immediately.
     * As one request could lead to multiple responses, this interface
     * demonstrates the idea of full duplexing.
     * 
*/ public io.grpc.stub.StreamObserver fullDuplexCall( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getFullDuplexCallMethod(), getCallOptions()), responseObserver); } /** *
     * A sequence of requests followed by a sequence of responses.
     * The server buffers all the client requests and then serves them in order. A
     * stream of responses are returned to the client when the server starts with
     * first request.
     * 
*/ public io.grpc.stub.StreamObserver halfDuplexCall( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getHalfDuplexCallMethod(), getCallOptions()), responseObserver); } /** *
     * The test server will not implement this method. It will be used
     * to test the behavior when clients call unimplemented methods.
     * 
*/ public void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getUnimplementedCallMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service TestService. *
   * A simple service to test the various types of RPCs and experiment with
   * performance with various types of payload.
   * 
*/ public static final class TestServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private TestServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected TestServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new TestServiceBlockingStub(channel, callOptions); } /** *
     * One empty request followed by one empty response.
     * 
*/ public io.grpc.testing.integration.EmptyProtos.Empty emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getEmptyCallMethod(), getCallOptions(), request); } /** *
     * One request followed by one response.
     * 
*/ public io.grpc.testing.integration.Messages.SimpleResponse unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getUnaryCallMethod(), getCallOptions(), request); } /** *
     * One request followed by one response. Response has cache control
     * headers set such that a caching HTTP proxy (such as GFE) can
     * satisfy subsequent requests.
     * 
*/ public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCacheableUnaryCallMethod(), getCallOptions(), request); } /** *
     * One request followed by a sequence of responses (streamed download).
     * The server returns the payload with client desired type and sizes.
     * 
*/ public java.util.Iterator streamingOutputCall( io.grpc.testing.integration.Messages.StreamingOutputCallRequest request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getStreamingOutputCallMethod(), getCallOptions(), request); } /** *
     * The test server will not implement this method. It will be used
     * to test the behavior when clients call unimplemented methods.
     * 
*/ public io.grpc.testing.integration.EmptyProtos.Empty unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getUnimplementedCallMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service TestService. *
   * A simple service to test the various types of RPCs and experiment with
   * performance with various types of payload.
   * 
*/ public static final class TestServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private TestServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected TestServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new TestServiceFutureStub(channel, callOptions); } /** *
     * One empty request followed by one empty response.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture emptyCall( io.grpc.testing.integration.EmptyProtos.Empty request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getEmptyCallMethod(), getCallOptions()), request); } /** *
     * One request followed by one response.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture unaryCall( io.grpc.testing.integration.Messages.SimpleRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request); } /** *
     * One request followed by one response. Response has cache control
     * headers set such that a caching HTTP proxy (such as GFE) can
     * satisfy subsequent requests.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture cacheableUnaryCall( io.grpc.testing.integration.Messages.SimpleRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCacheableUnaryCallMethod(), getCallOptions()), request); } /** *
     * The test server will not implement this method. It will be used
     * to test the behavior when clients call unimplemented methods.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture unimplementedCall( io.grpc.testing.integration.EmptyProtos.Empty request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getUnimplementedCallMethod(), getCallOptions()), request); } } private static final int METHODID_EMPTY_CALL = 0; private static final int METHODID_UNARY_CALL = 1; private static final int METHODID_CACHEABLE_UNARY_CALL = 2; private static final int METHODID_STREAMING_OUTPUT_CALL = 3; private static final int METHODID_UNIMPLEMENTED_CALL = 4; private static final int METHODID_STREAMING_INPUT_CALL = 5; private static final int METHODID_FULL_DUPLEX_CALL = 6; private static final int METHODID_HALF_DUPLEX_CALL = 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 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_EMPTY_CALL: serviceImpl.emptyCall((io.grpc.testing.integration.EmptyProtos.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_UNARY_CALL: serviceImpl.unaryCall((io.grpc.testing.integration.Messages.SimpleRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_CACHEABLE_UNARY_CALL: serviceImpl.cacheableUnaryCall((io.grpc.testing.integration.Messages.SimpleRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_STREAMING_OUTPUT_CALL: serviceImpl.streamingOutputCall((io.grpc.testing.integration.Messages.StreamingOutputCallRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_UNIMPLEMENTED_CALL: serviceImpl.unimplementedCall((io.grpc.testing.integration.EmptyProtos.Empty) 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_STREAMING_INPUT_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.streamingInputCall( (io.grpc.stub.StreamObserver) responseObserver); case METHODID_FULL_DUPLEX_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.fullDuplexCall( (io.grpc.stub.StreamObserver) responseObserver); case METHODID_HALF_DUPLEX_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.halfDuplexCall( (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( getEmptyCallMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty>( service, METHODID_EMPTY_CALL))) .addMethod( getUnaryCallMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.grpc.testing.integration.Messages.SimpleRequest, io.grpc.testing.integration.Messages.SimpleResponse>( service, METHODID_UNARY_CALL))) .addMethod( getCacheableUnaryCallMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.grpc.testing.integration.Messages.SimpleRequest, io.grpc.testing.integration.Messages.SimpleResponse>( service, METHODID_CACHEABLE_UNARY_CALL))) .addMethod( getStreamingOutputCallMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>( service, METHODID_STREAMING_OUTPUT_CALL))) .addMethod( getStreamingInputCallMethod(), io.grpc.stub.ServerCalls.asyncClientStreamingCall( new MethodHandlers< io.grpc.testing.integration.Messages.StreamingInputCallRequest, io.grpc.testing.integration.Messages.StreamingInputCallResponse>( service, METHODID_STREAMING_INPUT_CALL))) .addMethod( getFullDuplexCallMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>( service, METHODID_FULL_DUPLEX_CALL))) .addMethod( getHalfDuplexCallMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>( service, METHODID_HALF_DUPLEX_CALL))) .addMethod( getUnimplementedCallMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty>( service, METHODID_UNIMPLEMENTED_CALL))) .build(); } private static abstract class TestServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { TestServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.grpc.testing.integration.Test.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("TestService"); } } private static final class TestServiceFileDescriptorSupplier extends TestServiceBaseDescriptorSupplier { TestServiceFileDescriptorSupplier() {} } private static final class TestServiceMethodDescriptorSupplier extends TestServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; TestServiceMethodDescriptorSupplier(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 (TestServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new TestServiceFileDescriptorSupplier()) .addMethod(getEmptyCallMethod()) .addMethod(getUnaryCallMethod()) .addMethod(getCacheableUnaryCallMethod()) .addMethod(getStreamingOutputCallMethod()) .addMethod(getStreamingInputCallMethod()) .addMethod(getFullDuplexCallMethod()) .addMethod(getHalfDuplexCallMethod()) .addMethod(getUnimplementedCallMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy