JBIDE-13950 - Add support for Server Mode

Refactored the directory mode
Using listeners to detect new servers and listen to publish events