Search in sources :

Example 6 with SimpleResponse

use of io.grpc.testing.protobuf.SimpleResponse in project grpc-java by grpc.

the class XdsSdsClientServerTest method unaryRpc.

/**
 * Say hello to server.
 */
private static String unaryRpc(String requestMessage, SimpleServiceGrpc.SimpleServiceBlockingStub blockingStub) {
    SimpleRequest request = SimpleRequest.newBuilder().setRequestMessage(requestMessage).build();
    SimpleResponse response = blockingStub.unaryRpc(request);
    return response.getResponseMessage();
}
Also used : SimpleResponse(io.grpc.testing.protobuf.SimpleResponse) SimpleRequest(io.grpc.testing.protobuf.SimpleRequest)

Aggregations

SimpleRequest (io.grpc.testing.protobuf.SimpleRequest)6 SimpleResponse (io.grpc.testing.protobuf.SimpleResponse)6 ManagedChannel (io.grpc.ManagedChannel)3 StreamObserver (io.grpc.stub.StreamObserver)3 SimpleServiceGrpc (io.grpc.testing.protobuf.SimpleServiceGrpc)3 ServerInterceptor (io.grpc.ServerInterceptor)2 Test (org.junit.Test)2 Context (io.grpc.Context)1 Metadata (io.grpc.Metadata)1 ServerStreamTracer (io.grpc.ServerStreamTracer)1 CallMetricRecorder (io.grpc.services.CallMetricRecorder)1 InternalCallMetricRecorder (io.grpc.services.InternalCallMetricRecorder)1 InetSocketAddress (java.net.InetSocketAddress)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 Before (org.junit.Before)1