code: public void onStartup() throws StartupException {
          try {
              Map<String, Properties> fileListeners = getFileListeners();
              for (String listenerName : fileListeners.keySet()) {
                  Properties listenerProps = fileListeners.get(listenerName);
                  String listenerClassName = listenerProps.getProperty("ClassName");
                  logger.info("Registering File Listener: " + listenerName + "  Class: " + listenerClassName);
                  FileListener listener = getFileListenerInstance(listenerClassName);
                  listener.setName(listenerName);
                  registeredFileListeners.put(listenerName, listener);
                  listener.listen(listenerProps);
              }
          }
          catch (Exception ex) {
              ex.printStackTrace();
              logger.severeException(ex.getMessage(), ex);
              throw new StartupException(ex.getMessage());
          }
      }
docs: Startup the file listeners.