Class DataServiceServer


  • public final class DataServiceServer
    extends Object
    A sample gRPC server that serve the DataServiceServer service.
    • Constructor Detail

      • DataServiceServer

        public DataServiceServer​(int port,
                                 DataService ds)
        Create a DataServiceServer server listening on port.
        Parameters:
        port - Port
        ds - DS implementation
    • Method Detail

      • stop

        public void stop()
        Stop serving requests and shutdown resources.
      • blockUntilShutdown

        public void blockUntilShutdown()
                                throws InterruptedException
        Await termination on the main thread since the grpc library uses daemon threads.
        Throws:
        InterruptedException - Interrupted Exception.