Problem
When executing SprayServer.start() while there is already a server running or SprayServer.stop() when there is no server running, the program will tell you to register / unregister a server using DDS.setServer(server: Server) and DDS.unsetServer(), respectively.
It would be much nicer, if SprayServer checked whether there is already a server set and shows a respective hint for its methods instead of the generic setter and unsetter from DDS.
Solution
Check whether a server is set in DDS before SprayServer is trying to start or stop one, and avoid calling the DDS.setServer(server: Server) and DDS.unsetServer() methods if not necessary.
We might need to add a way to check whether a server is set to DDS.
Problem
When executing
SprayServer.start()while there is already a server running orSprayServer.stop()when there is no server running, the program will tell you to register / unregister a server usingDDS.setServer(server: Server)andDDS.unsetServer(), respectively.It would be much nicer, if
SprayServerchecked whether there is already a server set and shows a respective hint for its methods instead of the generic setter and unsetter fromDDS.Solution
Check whether a server is set in
DDSbeforeSprayServeris trying to start or stop one, and avoid calling theDDS.setServer(server: Server)andDDS.unsetServer()methods if not necessary.We might need to add a way to check whether a server is set to
DDS.