code: public void onShutdown() {
          for (String listenerName : registeredFileListeners.keySet()) {
              logger.info("Deregistering File Listener: " + listenerName);
              FileListener listener = registeredFileListeners.get(listenerName);
              listener.stopListening();
          }
      }
docs: Shutdown the file listeners.