The call to NotificationFilter.isNotificationEnabled takes place in the thread that called sendNotification.
For each selected listener, executor.execute is called with a command that calls the handleNotification method.