All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.terheyden.event.ModifiableEventSendStrategy Maven / Gradle / Ivy

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 eventRequest,
        Collection subscribers) {

        SendStrategies.sendModifiableEventToSubscribers(eventRequest, subscribers, getExceptionHandler());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy