Package io.grpc.testing.integration
Class TestServiceGrpc.TestServiceStub
- java.lang.Object
-
- io.grpc.stub.AbstractStub<S>
-
- io.grpc.stub.AbstractAsyncStub<TestServiceGrpc.TestServiceStub>
-
- io.grpc.testing.integration.TestServiceGrpc.TestServiceStub
-
- Enclosing class:
- TestServiceGrpc
public static final class TestServiceGrpc.TestServiceStub extends io.grpc.stub.AbstractAsyncStub<TestServiceGrpc.TestServiceStub>
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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TestServiceGrpc.TestServiceStubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions)voidcacheableUnaryCall(Messages.SimpleRequest request, io.grpc.stub.StreamObserver<Messages.SimpleResponse> responseObserver)One request followed by one response.voidemptyCall(EmptyProtos.Empty request, io.grpc.stub.StreamObserver<EmptyProtos.Empty> responseObserver)One empty request followed by one empty response.io.grpc.stub.StreamObserver<Messages.StreamingOutputCallRequest>fullDuplexCall(io.grpc.stub.StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)A sequence of requests with each request served by the server immediately.io.grpc.stub.StreamObserver<Messages.StreamingOutputCallRequest>halfDuplexCall(io.grpc.stub.StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)A sequence of requests followed by a sequence of responses.io.grpc.stub.StreamObserver<Messages.StreamingInputCallRequest>streamingInputCall(io.grpc.stub.StreamObserver<Messages.StreamingInputCallResponse> responseObserver)A sequence of requests followed by one response (streamed upload).voidstreamingOutputCall(Messages.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)One request followed by a sequence of responses (streamed download).voidunaryCall(Messages.SimpleRequest request, io.grpc.stub.StreamObserver<Messages.SimpleResponse> responseObserver)One request followed by one response.voidunimplementedCall(EmptyProtos.Empty request, io.grpc.stub.StreamObserver<EmptyProtos.Empty> responseObserver)The test server will not implement this method.
-
-
-
Method Detail
-
build
protected TestServiceGrpc.TestServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
- Specified by:
buildin classio.grpc.stub.AbstractStub<TestServiceGrpc.TestServiceStub>
-
emptyCall
public void emptyCall(EmptyProtos.Empty request, io.grpc.stub.StreamObserver<EmptyProtos.Empty> responseObserver)
One empty request followed by one empty response.
-
unaryCall
public void unaryCall(Messages.SimpleRequest request, io.grpc.stub.StreamObserver<Messages.SimpleResponse> responseObserver)
One request followed by one response.
-
cacheableUnaryCall
public void cacheableUnaryCall(Messages.SimpleRequest request, io.grpc.stub.StreamObserver<Messages.SimpleResponse> 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.
-
streamingOutputCall
public void streamingOutputCall(Messages.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)
One request followed by a sequence of responses (streamed download). The server returns the payload with client desired type and sizes.
-
streamingInputCall
public io.grpc.stub.StreamObserver<Messages.StreamingInputCallRequest> streamingInputCall(io.grpc.stub.StreamObserver<Messages.StreamingInputCallResponse> responseObserver)
A sequence of requests followed by one response (streamed upload). The server returns the aggregated size of client payload as the result.
-
fullDuplexCall
public io.grpc.stub.StreamObserver<Messages.StreamingOutputCallRequest> fullDuplexCall(io.grpc.stub.StreamObserver<Messages.StreamingOutputCallResponse> 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.
-
halfDuplexCall
public io.grpc.stub.StreamObserver<Messages.StreamingOutputCallRequest> halfDuplexCall(io.grpc.stub.StreamObserver<Messages.StreamingOutputCallResponse> 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.
-
unimplementedCall
public void unimplementedCall(EmptyProtos.Empty request, io.grpc.stub.StreamObserver<EmptyProtos.Empty> responseObserver)
The test server will not implement this method. It will be used to test the behavior when clients call unimplemented methods.
-
-