Class LogicModuleServer


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

      • LogicModuleServer

        public LogicModuleServer​(String srvName,
                                 int port,
                                 LogicModule lm)
        Create a LogicModuleServer server listening on port.
        Parameters:
        srvName - Server name
        port - Port.
        lm - LM impl.
    • Method Detail

      • start

        public void start()
                   throws IOException
        Start serving requests.
        Throws:
        IOException - If some exception occurs.
      • 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 - If some exception occurred.