public void start ( ) throws IOException { server . start ( ) ; logger . info ( "Server started, listening on " + port ) ; Runtime . getRuntime ( ) . addShutdownHook ( new Thread ( ) { @ Override public void run ( ) { // Use stderr here since the logger may has been reset by its JVM shutdown hook. System . err . println ( "*** shutting down gRPC server since JVM is shutting down" ) ; RouteGuideServer . this . stop ( ) ; System . err . println ( "*** server shut down" ) ; } } ) ; }
Start serving requests .