diff options
-rw-r--r-- | README.md | 6 | ||||
-rwxr-xr-x | java/run_greeter_client.sh (renamed from java/run_greetings_client.sh) | 4 | ||||
-rwxr-xr-x | java/run_greeter_server.sh (renamed from java/run_greetings_server.sh) | 4 | ||||
-rw-r--r-- | java/src/main/java/ex/grpc/GreeterClient.java (renamed from java/src/main/java/ex/grpc/GreetingsClient.java) | 8 | ||||
-rw-r--r-- | java/src/main/java/ex/grpc/GreeterServer.java (renamed from java/src/main/java/ex/grpc/GreetingsServer.java) | 6 |
5 files changed, 14 insertions, 14 deletions
@@ -369,7 +369,7 @@ We'll look at using a client to access the server in the next section. Client-side gRPC is pretty simple. In this step, we'll use the generated code to write a simple client that can access the `Greeter` server we created in the [previous section](#server). You can see the complete client code in -[GreetingClient.java](java/src/main/java/ex/grpc/GreetingsClient.java). +[GreeterClient.java](java/src/main/java/ex/grpc/GreeterClient.java). Again, we're not going to go into much detail about how to implement a client - we'll leave that for the tutorial. @@ -462,13 +462,13 @@ We've added simple shell scripts to simplifying running the examples. Now that they are built, you can run the server with: ```sh -$ ./run_greetings_server.sh +$ ./run_greeter_server.sh ``` and in another terminal window confirm that it receives a message. ```sh -$ ./run_greetings_client.sh +$ ./run_greeter_client.sh ``` ### Adding another client diff --git a/java/run_greetings_client.sh b/java/run_greeter_client.sh index 8155589adf..e86ab4ae89 100755 --- a/java/run_greetings_client.sh +++ b/java/run_greeter_client.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -TARGET='Greetings Client' -TARGET_CLASS='ex.grpc.GreetingsClient' +TARGET='Greeter Client' +TARGET_CLASS='ex.grpc.GreeterClient' TARGET_ARGS="$@" cd "$(dirname "$0")" diff --git a/java/run_greetings_server.sh b/java/run_greeter_server.sh index 248229e129..836abc7f48 100755 --- a/java/run_greetings_server.sh +++ b/java/run_greeter_server.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -TARGET='Greetings Server' -TARGET_CLASS='ex.grpc.GreetingsServer' +TARGET='Greeter Server' +TARGET_CLASS='ex.grpc.GreeterServer' cd "$(dirname "$0")" mvn -q -nsu -am package -Dcheckstyle.skip=true -DskipTests diff --git a/java/src/main/java/ex/grpc/GreetingsClient.java b/java/src/main/java/ex/grpc/GreeterClient.java index 141ad1e20a..9a4615132d 100644 --- a/java/src/main/java/ex/grpc/GreetingsClient.java +++ b/java/src/main/java/ex/grpc/GreeterClient.java @@ -9,13 +9,13 @@ import java.util.logging.Level; import java.util.logging.Logger; import java.util.concurrent.TimeUnit; -public class GreetingsClient { +public class GreeterClient { private final Logger logger = Logger.getLogger( - GreetingsClient.class.getName()); + GreeterClient.class.getName()); private final ChannelImpl channel; private final GreeterGrpc.GreeterBlockingStub blockingStub; - public GreetingsClient(String host, int port) { + public GreeterClient(String host, int port) { channel = NettyChannelBuilder.forAddress(host, port) .negotiationType(NegotiationType.PLAINTEXT) .build(); @@ -40,7 +40,7 @@ public class GreetingsClient { } public static void main(String[] args) throws Exception { - GreetingsClient client = new GreetingsClient("localhost", 50051); + GreeterClient client = new GreeterClient("localhost", 50051); try { /* Access a service running on the local machine on port 50051 */ String user = "world"; diff --git a/java/src/main/java/ex/grpc/GreetingsServer.java b/java/src/main/java/ex/grpc/GreeterServer.java index 237309d13c..bb05680b0a 100644 --- a/java/src/main/java/ex/grpc/GreetingsServer.java +++ b/java/src/main/java/ex/grpc/GreeterServer.java @@ -7,9 +7,9 @@ import com.google.net.stubby.transport.netty.NettyServerBuilder; import java.util.concurrent.TimeUnit; /** - * Server that manages startup/shutdown of a {@code Greetings} server. + * Server that manages startup/shutdown of a {@code Greeter} server. */ -public class GreetingsServer { +public class GreeterServer { /* The port on which the server should run */ private int port = 50051; private ServerImpl server; @@ -33,7 +33,7 @@ public class GreetingsServer { * Main launches the server from the command line. */ public static void main(String[] args) throws Exception { - final GreetingsServer server = new GreetingsServer(); + final GreeterServer server = new GreeterServer(); Runtime.getRuntime().addShutdownHook(new Thread() { @Override |