Here are the examples of the java api org.springframework.events.CompletableEventPublication.of() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
18
Source : JpaEventPublicationRegistry.java
with Apache License 2.0
from odrotbohm
with Apache License 2.0
from odrotbohm
/*
* (non-Javadoc)
* @see org.springframework.events.EventPublicationRegistry#store(java.lang.Object, java.util.Collection)
*/
@Override
public void store(Object event, Collection<ApplicationListener<?>> listeners) {
//
listeners.stream().map(//
it -> PublicationTargetIdentifier.forListener(it)).map(//
it -> CompletableEventPublication.of(event, it)).map(//
this::map).forEach(it -> events.save(it));
}
16
Source : MapEventPublicationRegistry.java
with Apache License 2.0
from odrotbohm
with Apache License 2.0
from odrotbohm
/*
* (non-Javadoc)
* @see org.springframework.events.EventPublicationRegistry#store(java.lang.Object, java.util.Collection)
*/
@Override
public void store(Object event, Collection<ApplicationListener<?>> listeners) {
listeners.forEach(listener -> {
PublicationTargetIdentifier id = PublicationTargetIdentifier.forListener(listener);
events.computeIfAbsent(Key.of(event, id), it -> CompletableEventPublication.of(event, id));
});
}