public class TestServiceImpl extends Object implements io.grpc.BindableService, TestServiceGrpc.AsyncService
| Constructor and Description |
|---|
TestServiceImpl(ScheduledExecutorService executor) |
TestServiceImpl(ScheduledExecutorService executor,
io.grpc.services.MetricRecorder metricRecorder)
Constructs a controller using the given executor for scheduling response stream chunks.
|
| Modifier and Type | Method and Description |
|---|---|
io.grpc.ServerServiceDefinition |
bindService() |
void |
emptyCall(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)
True bi-directional streaming.
|
io.grpc.stub.StreamObserver<Messages.StreamingOutputCallRequest> |
halfDuplexCall(io.grpc.stub.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. |
static List<io.grpc.ServerInterceptor> |
interceptors()
Returns interceptors necessary for full service implementation.
|
io.grpc.stub.StreamObserver<Messages.StreamingInputCallRequest> |
streamingInputCall(io.grpc.stub.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,
io.grpc.stub.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,
io.grpc.stub.StreamObserver<Messages.SimpleResponse> responseObserver)
Immediately responds with a payload of the type and size specified in the request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcacheableUnaryCall, unimplementedCallpublic TestServiceImpl(ScheduledExecutorService executor, io.grpc.services.MetricRecorder metricRecorder)
public TestServiceImpl(ScheduledExecutorService executor)
public final io.grpc.ServerServiceDefinition bindService()
bindService in interface io.grpc.BindableServicepublic void emptyCall(EmptyProtos.Empty request, io.grpc.stub.StreamObserver<EmptyProtos.Empty> responseObserver)
TestServiceGrpc.AsyncServiceOne empty request followed by one empty response.
emptyCall in interface TestServiceGrpc.AsyncServicepublic void unaryCall(Messages.SimpleRequest req, io.grpc.stub.StreamObserver<Messages.SimpleResponse> responseObserver)
unaryCall in interface TestServiceGrpc.AsyncServicepublic void streamingOutputCall(Messages.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)
streamingOutputCall in interface TestServiceGrpc.AsyncServicepublic io.grpc.stub.StreamObserver<Messages.StreamingInputCallRequest> streamingInputCall(io.grpc.stub.StreamObserver<Messages.StreamingInputCallResponse> responseObserver)
streamingInputCall in interface TestServiceGrpc.AsyncServicepublic io.grpc.stub.StreamObserver<Messages.StreamingOutputCallRequest> fullDuplexCall(io.grpc.stub.StreamObserver<Messages.StreamingOutputCallResponse> responseObserver)
fullDuplexCall in interface TestServiceGrpc.AsyncServicepublic io.grpc.stub.StreamObserver<Messages.StreamingOutputCallRequest> halfDuplexCall(io.grpc.stub.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.AsyncServicepublic Queue<io.grpc.testing.integration.TestServiceImpl.Chunk> toChunkQueue(Messages.StreamingOutputCallRequest request)
public static List<io.grpc.ServerInterceptor> interceptors()