Skip to content

Commit 38860fe

Browse files
authored
Make creating the ServerBuilder part of the codelab (#22)
1 parent 8249872 commit 38860fe

File tree

1 file changed

+8
-0
lines changed
  • codelabs/grpc-java-getting-started/start_here/src/main/java/io/grpc/examples/routeguide

1 file changed

+8
-0
lines changed

codelabs/grpc-java-getting-started/start_here/src/main/java/io/grpc/examples/routeguide/RouteGuideServer.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ public RouteGuideServer(int port) throws IOException {
2727

2828
/** Create a RouteGuide server listening on {@code port} using {@code featureFile} database. */
2929
public RouteGuideServer(int port, URL featureFile) throws IOException {
30+
/****************************************************************
31+
* Codelab Hint: Create a ServerBuilder object and pass it to the other constructor
32+
* Use RouteGuideUtil.parseFeatures(featureFile) to load the features
33+
*
34+
this(<create ServerBuilder>,
35+
port, RouteGuideUtil.parseFeatures(featureFile));
36+
****************************************************************/
37+
3038
this(Grpc.newServerBuilderForPort(port, InsecureServerCredentials.create()),
3139
port, RouteGuideUtil.parseFeatures(featureFile));
3240
}

0 commit comments

Comments
 (0)