Programmatic Jetty shutdown

前端 未结 3 983
别那么骄傲
别那么骄傲 2021-02-06 08:08

How to programmatically shutdown embedded jetty server?

I start jetty server like this:

Server server = new Server(8090);
...
server.start();
server.joi         


        
3条回答
  •  面向向阳花
    2021-02-06 08:39

    Try server.setGracefulShutdown(stands_for_milliseconds);.

    I think it's similar to thread.join(stands_for_milliseconds);.

提交回复
热议问题