class AbstractSignalNotificationHandler {

  protected void notifyListeners(final SignalEvent event) {
    Set<SignalListener> listeners = signalListeners.get(event.getSignal());
    Set<SignalListener> localListeners = Collections.emptySet();

    if (listeners != null) {
      synchronized (listeners) {
        localListeners = new HashSet<>(listeners);
      }
    }

    for (SignalListener listener : localListeners) {
      listener.handle(event);
    }
  }

  protected  AbstractSignalNotificationHandler();

}