public class TestServiceImpl
extends io.grpc.testing.integration.TestServiceGrpc.TestServiceImplBase
| 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(com.google.protobuf.EmptyProtos.Empty empty,
io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty> responseObserver) |
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> |
fullDuplexCall(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver)
True bi-directional streaming.
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> |
halfDuplexCall(io.grpc.stub.StreamObserver<io.grpc.testing.integration.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<io.grpc.testing.integration.Messages.StreamingInputCallRequest> |
streamingInputCall(io.grpc.stub.StreamObserver<io.grpc.testing.integration.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(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request,
io.grpc.stub.StreamObserver<io.grpc.testing.integration.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(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request)
Breaks down the request and creates a queue of response chunks for the given request.
|
void |
unaryCall(io.grpc.testing.integration.Messages.SimpleRequest req,
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver)
Immediately responds with a payload of the type and size specified in the request.
|
public TestServiceImpl(ScheduledExecutorService executor)
public void emptyCall(com.google.protobuf.EmptyProtos.Empty empty,
io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty> responseObserver)
emptyCall in class io.grpc.testing.integration.TestServiceGrpc.TestServiceImplBasepublic void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest req,
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver)
unaryCall in class io.grpc.testing.integration.TestServiceGrpc.TestServiceImplBasepublic void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request,
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver)
streamingOutputCall in class io.grpc.testing.integration.TestServiceGrpc.TestServiceImplBasepublic io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallRequest> streamingInputCall(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallResponse> responseObserver)
streamingInputCall in class io.grpc.testing.integration.TestServiceGrpc.TestServiceImplBasepublic io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> fullDuplexCall(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver)
fullDuplexCall in class io.grpc.testing.integration.TestServiceGrpc.TestServiceImplBasepublic io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> halfDuplexCall(io.grpc.stub.StreamObserver<io.grpc.testing.integration.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 class io.grpc.testing.integration.TestServiceGrpc.TestServiceImplBasepublic Queue<io.grpc.testing.integration.TestServiceImpl.Chunk> toChunkQueue(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request)
public static List<io.grpc.ServerInterceptor> interceptors()