private void notifyEventToChild(@NotNull MapEvent<K, V> changeEvent) { K key = changeEvent.getKey(); if (asset.hasChildren() && key instanceof CharSequence) { String keyStr = key.toString(); Asset child = asset.getChild(keyStr); if (child != null) { SubscriptionCollection subscription = child.subscription(false); if (subscription instanceof MapSimpleSubscription) { // System.out.println(changeEvent.toString().substring(0, 100)); ((SimpleSubscription) subscription).notifyMessage(changeEvent.getValue()); } } } }
private void notifyEvent1(@NotNull MapEvent<K, V> changeEvent) { K key = changeEvent.getKey(); if (!topicSubscribers.isEmpty()) { V value = changeEvent.getValue(); notifyEachSubscriber(topicSubscribers, ts -> ts.onMessage(key, value)); } if (!subscribers.isEmpty()) { notifyEachSubscriber(subscribers, s -> s.onMessage(changeEvent)); } if (!keySubscribers.isEmpty()) { notifyEachSubscriber(keySubscribers, s -> s.onMessage(key)); } if (!downstream.isEmpty()) { notifyEachSubscriber(downstream, d -> d.notifyEvent(changeEvent)); } }