timely icon indicating copy to clipboard operation
timely copied to clipboard

Refactor Server class to use an interface

Open klucar opened this issue 9 years ago • 1 comments

The Server constructor has the side effect of actually starting the Server. Server should implement an interface with methods like start, stop. Then we can inject a Server instance like standalone or live server. Because we're using Spring in #68, we should probably go with Spring injection.

This would also make #62 trivial.

klucar avatar Aug 25 '16 12:08 klucar

What is the main goal here? If it's to remove server startup from application main method (with the end goal being to implement #62), then the way to do it might be to use Spring Boot ApplicationRunner instances (one each for put server, query server, websocket server). These can be ordered for priority at startup (if necessary) and tied to spring boot profiles as well (e.g., websocket is only started if the websocket profile is active).

brianloss avatar Aug 25 '16 15:08 brianloss