blob: dcf1d831e263d22c8f2a9c824da4669df7603405 [file] [log] [blame]
package io.grpc.testing.integration;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncDuplexStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncDuplexStreamingCall;
@javax.annotation.Generated("by gRPC proto compiler")
public class TestServiceGrpc {
// Static method descriptors that strictly reflect the proto.
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.SimpleRequest,
io.grpc.testing.integration.Test.SimpleResponse> METHOD_UNARY_CALL =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
"grpc.testing.TestService", "UnaryCall",
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleRequest.parser()),
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleResponse.parser()));
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
"grpc.testing.TestService", "StreamingOutputCall",
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.parser()),
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.parser()));
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingInputCallRequest,
io.grpc.testing.integration.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING,
"grpc.testing.TestService", "StreamingInputCall",
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallRequest.parser()),
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallResponse.parser()));
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_DUPLEX_CALL =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
"grpc.testing.TestService", "FullDuplexCall",
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.parser()),
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.parser()));
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_DUPLEX_CALL =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
"grpc.testing.TestService", "HalfDuplexCall",
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.parser()),
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.parser()));
public static TestServiceStub newStub(io.grpc.Channel channel) {
return new TestServiceStub(channel);
}
public static TestServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new TestServiceBlockingStub(channel);
}
public static TestServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
return new TestServiceFutureStub(channel);
}
public static interface TestService {
public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request,
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver);
public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver);
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullDuplexCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfDuplexCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
}
public static interface TestServiceBlockingClient {
public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request);
public java.util.Iterator<io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall(
io.grpc.testing.integration.Test.StreamingOutputCallRequest request);
}
public static interface TestServiceFutureClient {
public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Test.SimpleResponse> unaryCall(
io.grpc.testing.integration.Test.SimpleRequest request);
}
public static class TestServiceStub extends io.grpc.stub.AbstractStub<TestServiceStub>
implements TestService {
private TestServiceStub(io.grpc.Channel channel) {
super(channel);
}
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);
}
@java.lang.Override
public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request,
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver) {
asyncUnaryCall(
channel.newCall(METHOD_UNARY_CALL, callOptions), request, responseObserver);
}
@java.lang.Override
public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
asyncServerStreamingCall(
channel.newCall(METHOD_STREAMING_OUTPUT_CALL, callOptions), request, responseObserver);
}
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver) {
return asyncClientStreamingCall(
channel.newCall(METHOD_STREAMING_INPUT_CALL, callOptions), responseObserver);
}
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullDuplexCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
return asyncDuplexStreamingCall(
channel.newCall(METHOD_FULL_DUPLEX_CALL, callOptions), responseObserver);
}
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfDuplexCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
return asyncDuplexStreamingCall(
channel.newCall(METHOD_HALF_DUPLEX_CALL, callOptions), responseObserver);
}
}
public static class TestServiceBlockingStub extends io.grpc.stub.AbstractStub<TestServiceBlockingStub>
implements TestServiceBlockingClient {
private TestServiceBlockingStub(io.grpc.Channel channel) {
super(channel);
}
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);
}
@java.lang.Override
public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request) {
return blockingUnaryCall(
channel.newCall(METHOD_UNARY_CALL, callOptions), request);
}
@java.lang.Override
public java.util.Iterator<io.grpc.testing.integration.Test.StreamingOutputCallResponse> streamingOutputCall(
io.grpc.testing.integration.Test.StreamingOutputCallRequest request) {
return blockingServerStreamingCall(
channel.newCall(METHOD_STREAMING_OUTPUT_CALL, callOptions), request);
}
}
public static class TestServiceFutureStub extends io.grpc.stub.AbstractStub<TestServiceFutureStub>
implements TestServiceFutureClient {
private TestServiceFutureStub(io.grpc.Channel channel) {
super(channel);
}
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);
}
@java.lang.Override
public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Test.SimpleResponse> unaryCall(
io.grpc.testing.integration.Test.SimpleRequest request) {
return futureUnaryCall(
channel.newCall(METHOD_UNARY_CALL, callOptions), request);
}
}
public static io.grpc.ServerServiceDefinition bindService(
final TestService serviceImpl) {
return io.grpc.ServerServiceDefinition.builder("grpc.testing.TestService")
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_UNARY_CALL,
asyncUnaryCall(
new io.grpc.stub.ServerCalls.UnaryMethod<
io.grpc.testing.integration.Test.SimpleRequest,
io.grpc.testing.integration.Test.SimpleResponse>() {
@java.lang.Override
public void invoke(
io.grpc.testing.integration.Test.SimpleRequest request,
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.SimpleResponse> responseObserver) {
serviceImpl.unaryCall(request, responseObserver);
}
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_STREAMING_OUTPUT_CALL,
asyncServerStreamingCall(
new io.grpc.stub.ServerCalls.ServerStreamingMethod<
io.grpc.testing.integration.Test.StreamingOutputCallRequest,
io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
@java.lang.Override
public void invoke(
io.grpc.testing.integration.Test.StreamingOutputCallRequest request,
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
serviceImpl.streamingOutputCall(request, responseObserver);
}
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_STREAMING_INPUT_CALL,
asyncClientStreamingCall(
new io.grpc.stub.ServerCalls.ClientStreamingMethod<
io.grpc.testing.integration.Test.StreamingInputCallRequest,
io.grpc.testing.integration.Test.StreamingInputCallResponse>() {
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> invoke(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver) {
return serviceImpl.streamingInputCall(responseObserver);
}
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_FULL_DUPLEX_CALL,
asyncDuplexStreamingCall(
new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
io.grpc.testing.integration.Test.StreamingOutputCallRequest,
io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
return serviceImpl.fullDuplexCall(responseObserver);
}
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_HALF_DUPLEX_CALL,
asyncDuplexStreamingCall(
new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
io.grpc.testing.integration.Test.StreamingOutputCallRequest,
io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
return serviceImpl.halfDuplexCall(responseObserver);
}
}))).build();
}
}