Class DefaultEventExternalizationConfiguration
java.lang.Object
org.springframework.modulith.events.DefaultEventExternalizationConfiguration
- All Implemented Interfaces:
- EventExternalizationConfiguration
class DefaultEventExternalizationConfiguration
extends Object
implements EventExternalizationConfiguration
Default implementation of 
EventExternalizationConfiguration.- Since:
- 1.1
- Author:
- Oliver Drotbohm
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.modulith.events.EventExternalizationConfigurationEventExternalizationConfiguration.Router, EventExternalizationConfiguration.Selector
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultEventExternalizationConfiguration(Predicate<Object> filter, Function<Object, Object> mapper, Function<Object, RoutingTarget> router, Function<Object, Map<String, Object>> headers) Creates a newDefaultEventExternalizationConfiguration
- 
Method SummaryModifier and TypeMethodDescription(package private) static EventExternalizationConfiguration.Selectorbuilder()Returns a newEventExternalizationConfiguration.Selectorinstance to build up a new configuration.determineTarget(Object event) Determines theRoutingTargetfor the given event based on the current configuration.getHeadersFor(Object event) Returns the headers to be attached to the message sent out for the given event.Map the event to be externalized before publishing it.booleanWhether the configuration supports the given event.
- 
Constructor Details- 
DefaultEventExternalizationConfigurationDefaultEventExternalizationConfiguration(Predicate<Object> filter, Function<Object, Object> mapper, Function<Object, RoutingTarget> router, Function<Object, Map<String, Object>> headers) Creates a newDefaultEventExternalizationConfiguration- Parameters:
- filter- must not be null.
- mapper- must not be null.
- router- must not be null.
- headers- must not be null.
 
 
- 
- 
Method Details- 
builderReturns a newEventExternalizationConfiguration.Selectorinstance to build up a new configuration.- Returns:
- will never be null.
 
- 
supportsDescription copied from interface:EventExternalizationConfigurationWhether the configuration supports the given event. In other words, whether the given event is supposed to be externalized in the first place.- Specified by:
- supportsin interface- EventExternalizationConfiguration
- Parameters:
- event- must not be null.
- Returns:
- whether to externalize the given event.
 
- 
mapDescription copied from interface:EventExternalizationConfigurationMap the event to be externalized before publishing it.- Specified by:
- mapin interface- EventExternalizationConfiguration
- Parameters:
- event- must not be null.
- Returns:
- the mapped event.
 
- 
determineTargetDescription copied from interface:EventExternalizationConfigurationDetermines theRoutingTargetfor the given event based on the current configuration.- Specified by:
- determineTargetin interface- EventExternalizationConfiguration
- Parameters:
- event- must not be null.
- Returns:
- will never be null.
 
- 
getHeadersForDescription copied from interface:EventExternalizationConfigurationReturns the headers to be attached to the message sent out for the given event.- Specified by:
- getHeadersForin interface- EventExternalizationConfiguration
- Parameters:
- event- must not be null.
- Returns:
- will never be null.
 
 
-