From c67a6f6d2d2bf4023613f2b5301be0ac4c5bf835 Mon Sep 17 00:00:00 2001 From: civitarese Date: Thu, 4 Apr 2019 23:28:33 +0200 Subject: [PATCH] Small refactoring --- src/main/java/grpchelloserver/GreetingServiceClient.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/grpchelloserver/GreetingServiceClient.java b/src/main/java/grpchelloserver/GreetingServiceClient.java index 1f5c992..23ec5e0 100644 --- a/src/main/java/grpchelloserver/GreetingServiceClient.java +++ b/src/main/java/grpchelloserver/GreetingServiceClient.java @@ -1,6 +1,7 @@ package grpchelloserver; import com.example.grpc.GreetingServiceGrpc; +import com.example.grpc.GreetingServiceGrpc.*; import com.example.grpc.GreetingServiceOuterClass.*; import io.grpc.ManagedChannel; import io.grpc.ManagedChannelBuilder; @@ -36,7 +37,7 @@ public class GreetingServiceClient { final ManagedChannel channel = ManagedChannelBuilder.forTarget("localhost:8080").usePlaintext(true).build(); //creating a blocking stub on the channel - GreetingServiceGrpc.GreetingServiceBlockingStub stub = GreetingServiceGrpc.newBlockingStub(channel); + GreetingServiceBlockingStub stub = GreetingServiceGrpc.newBlockingStub(channel); //creating the HelloResponse object which will be provided as input to the RPC method HelloRequest request = HelloRequest.newBuilder().setName("Pippo").build(); @@ -59,7 +60,7 @@ public class GreetingServiceClient { final ManagedChannel channel = ManagedChannelBuilder.forTarget("localhost:8080").usePlaintext(true).build(); //creating an asynchronous stub on the channel - GreetingServiceGrpc.GreetingServiceStub stub = GreetingServiceGrpc.newStub(channel); + GreetingServiceStub stub = GreetingServiceGrpc.newStub(channel); //creating the HelloResponse object which will be provided as input to the RPC method HelloRequest request = HelloRequest.newBuilder().setName("Pippo").build(); -- 2.18.1