Files are now read from Goblint conf instead of GobPie conf.
Goblint server is restarted when the Goblint configuration file is modified.
The latter is implemented using FileAlterationObserver because this allows tracking the fileChangedevent. The WatchService, that was used previously for determining whether the socket file has been made and waiting until it is, was not good for this case, because it expects a while loop, which halts the process until something happens, so it should've been done in a separate thread, but synchronizing the threads later would have been a headache. FileAlterationObserver lets one check whether any files were changed compared to the previous time the file was encountered and if so, take action without needing to halt and wait for an event to happen.
Closes #23 and #24
The latter is implemented using
FileAlterationObserver
because this allows tracking thefileChanged
event. TheWatchService
, that was used previously for determining whether the socket file has been made and waiting until it is, was not good for this case, because it expects a while loop, which halts the process until something happens, so it should've been done in a separate thread, but synchronizing the threads later would have been a headache.FileAlterationObserver
lets one check whether any files were changed compared to the previous time the file was encountered and if so, take action without needing to halt and wait for an event to happen.