code: private <T extends Rdp4jListener> void notifyListeners(Class<T> listenerType, Notifier<T> notifier)
              throws InterruptedException {
          for (Rdp4jListener listener : listeners) {
              if (isInstanceOf(listener, listenerType)) {
                  /*
                   * This cast is correct, since we check if listener
                   * is instance of listenerType.
                   */
                  @SuppressWarnings("unchecked")
                  T listener2 = (T) listener;
                  try {
                      notifier.notify(listener2);
                  } catch (InterruptedException e) {
                      throw e;
                  } catch (Throwable e) {
                      logErrorMessage(e);
                  }
              }
          }
      }
docs: /*
  Ignore if a listener crashes. Log on ERROR level and continue with next listener.
  Don't let one listener ruin for other listeners...
  if interrupted re-throw InterruptedException.