code: @Override
      public void addNotificationHandler(String serviceName, NotificationHandler handler) throws ServiceException {
  
          ServiceInstanceUtils.validateManagerIsStarted(isStarted.get());
          ServiceInstanceUtils.validateServiceName(serviceName);
          if (handler == null) {
              throw new ServiceException(ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR,
                      ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR.getMessageTemplate(),
                      "NotificationHandler");
          }
          ModelService service = getLookupService().getModelService(serviceName);
          if (service == null) {
              throw new ServiceException(ErrorCode.SERVICE_DOES_NOT_EXIST,ErrorCode.SERVICE_DOES_NOT_EXIST.getMessageTemplate(),serviceName);
          }
          getLookupService().addNotificationHandler(serviceName, handler);
  
      }
docs: Add a NotificationHandler to the Service.
  
  This method can check the duplicated NotificationHandler for the serviceName, if the NotificationHandler
  already exists for the serviceName, do nothing.
  
  Throws IllegalArgumentException if serviceName or handler is null.
  
  @param serviceName
  the service name.
  @param handler
  the NotificationHandler for the service.
  @deprecated