Class EventExternalizerSupport
java.lang.Object
org.springframework.modulith.events.support.EventExternalizerSupport
- Direct Known Subclasses:
TransportAwareEventExternalizer
Fundamental support for event externalization. Considers the configured
EventExternalizationConfiguration
before handing off the ultimate message publication to externalize(Object, RoutingTarget).- Since:
- 2.1
- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEventExternalizerSupport(EventExternalizationConfiguration configuration) Creates a newEventExternalizationSupportfor the givenEventExternalizationConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionexternalize(Object event) Externalizes the given event.protected abstract CompletableFuture<?>externalize(Object payload, RoutingTarget target) Publish the given payload to the givenRoutingTarget.
-
Constructor Details
-
EventExternalizerSupport
Creates a newEventExternalizationSupportfor the givenEventExternalizationConfiguration.- Parameters:
configuration- must not be null.
-
-
Method Details
-
externalize
Externalizes the given event.- Parameters:
event- must not be null.- Returns:
- the externalization result, will never be null.
-
externalize
Publish the given payload to the givenRoutingTarget.- Parameters:
payload- must not be null.target- must not be null.- Returns:
- the externalization result, will never be null.
-