code: @Override
      public synchronized boolean registerForNotifications(ArtifactNotification targets, ArtifactListener callbackObject) throws IllegalArgumentException {
          verifyTargets(targets);
  
          Set<String> pathsToMonitor = new HashSet<String>();
          Set<String> nonRecursePathsToMonitor = new HashSet<String>();
  
          for (String path : targets.getPaths()) {
              ArtifactListenerSelector artifactSelectorCallback = new ArtifactListenerSelector(callbackObject);
              addTarget(path, artifactSelectorCallback, pathsToMonitor, nonRecursePathsToMonitor);
          }
  
          updateMonitoredPaths(pathsToMonitor, null, nonRecursePathsToMonitor, null);
  
          return true;
      }
docs: {@inheritDoc}