code: @Override
      public void addServiceListener(ServiceListener listener, String filter) throws InvalidSyntaxException {
          if (null == filteredServiceListeners.get(filter)) {
              filteredServiceListeners.put(filter, new ArrayList<ServiceListener>(1));
          }
  
          filteredServiceListeners.get(filter).add(listener);
      }
docs: Register a listener for a service, using a filter expression.
  @param listener the listener callback object to register
  @param filter a filter expression matching a service