public class TestServiceImpl extends Object implements TestServiceGrpc.TestService
Constructor and Description |
---|
TestServiceImpl(ScheduledExecutorService executor)
Constructs a controller using the given executor for scheduling response stream chunks.
|
Modifier and Type | Method and Description |
---|---|
void |
emptyCall(EmptyProtos.Empty empty,
StreamObserver<EmptyProtos.Empty> responseObserver) |
StreamObserver<Messages.StreamingOutputCallRequest> |
fullDuplexCall(StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)
True bi-directional streaming.
|
StreamObserver<Messages.StreamingOutputCallRequest> |
halfDuplexCall(StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)
Similar to
fullDuplexCall(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>) , except that it waits for all streaming requests to be
received before starting the streaming responses. |
StreamObserver<Messages.StreamingInputCallRequest> |
streamingInputCall(StreamObserver<Messages.StreamingInputCallResponse> responseObserver)
Waits until we have received all of the request messages and then returns the aggregate payload
size for all of the received requests.
|
void |
streamingOutputCall(Messages.StreamingOutputCallRequest request,
StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)
Given a request that specifies chunk size and interval between responses, creates and schedules
the response stream.
|
Queue<io.grpc.testing.integration.TestServiceImpl.Chunk> |
toChunkQueue(Messages.StreamingOutputCallRequest request)
Breaks down the request and creates a queue of response chunks for the given request.
|
void |
unaryCall(Messages.SimpleRequest req,
StreamObserver<Messages.SimpleResponse> responseObserver)
Immediately responds with a payload of the type and size specified in the request.
|
public TestServiceImpl(ScheduledExecutorService executor)
public void emptyCall(EmptyProtos.Empty empty, StreamObserver<EmptyProtos.Empty> responseObserver)
emptyCall
in interface TestServiceGrpc.TestService
public void unaryCall(Messages.SimpleRequest req, StreamObserver<Messages.SimpleResponse> responseObserver)
unaryCall
in interface TestServiceGrpc.TestService
public void streamingOutputCall(Messages.StreamingOutputCallRequest request, StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)
streamingOutputCall
in interface TestServiceGrpc.TestService
public StreamObserver<Messages.StreamingInputCallRequest> streamingInputCall(StreamObserver<Messages.StreamingInputCallResponse> responseObserver)
streamingInputCall
in interface TestServiceGrpc.TestService
public StreamObserver<Messages.StreamingOutputCallRequest> fullDuplexCall(StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)
fullDuplexCall
in interface TestServiceGrpc.TestService
public StreamObserver<Messages.StreamingOutputCallRequest> halfDuplexCall(StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)
fullDuplexCall(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>)
, except that it waits for all streaming requests to be
received before starting the streaming responses.halfDuplexCall
in interface TestServiceGrpc.TestService
public Queue<io.grpc.testing.integration.TestServiceImpl.Chunk> toChunkQueue(Messages.StreamingOutputCallRequest request)