com.terheyden.event.ModifiableEventSendStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of event-router Show documentation
Show all versions of event-router Show documentation
Simple, fast, flexible event router / event bus for Java
The newest version!
package com.terheyden.event;
import java.util.Collection;
/**
* Publishes events to subscribers in order, on the calling thread.
* Subscribers may modify the event object, replace it completely, or return null to stop propagation.
*/
class ModifiableEventSendStrategy extends ExceptionHandlingSendEventStrategy {
ModifiableEventSendStrategy(SubscriberExceptionHandler exceptionHandler) {
super(exceptionHandler);
}
@Override
public void sendEventToSubscribers(
EventRequest extends T> eventRequest,
Collection extends EventSubscription> subscribers) {
SendStrategies.sendModifiableEventToSubscribers(eventRequest, subscribers, getExceptionHandler());
}
}